IValidityState
The ValidityState interface represents the validity states that an element
can be in, with respect to constraint validation. Together, they help explain
why an element's value fails to validate, if it's not valid.
Gets if the value is regarded is invalid input.
Gets the element's custom validity message.
Gets if the value does not match the specified pattern.
Gets if the value is greater than the maximum specified by the max attribute.
Gets if the value is less than the minimum specified by the min attribute.
Gets if the value does not fit the rules determined by the step attribute
(that is, it's not evenly divisible by the step value).
Gets if the value exceeds the specified maxlength.
Gets if the value is below the specified minlength.
Gets if the value is not in the required syntax (when type is email or url).
Gets if the element meets all constraint validations, and is therefore
considered to be valid.
Gets if the element has a required attribute, but no value.