export const inputOverrideValidConstraintsMixin = (superclass) =>
  class InputOverrideValidConstraintsMixinClass extends superclass {
    init() {
      super.init?.();

      // vaadin uses `validConstraints` (required, pattern, minlength, maxlength) to determine if it should validate
      // the input or not. We want to override this behavior, so we can enforce validation even if these attributes are not present.
      if (this.baseElement._hasValidConstraints) {
        this.baseElement._hasValidConstraints = () => true;
      }
    }
  };
