ValidityState
The ValidityState
interface represents the validity states that an element can be in, with respect to constraint validation.
Properties
The read-only customError
property of the ValidityState
interface returns true
if an element doesn't meet the validation required in the custom validity set by the element's HTMLInputElement.setCustomValidity method.
The read-only patternMismatch
property of the ValidityState
interface indicates if the value of an input, after having been edited by the user, does not conform to the constraints set by the element's pattern
attribute.
The read-only rangeOverflow
property of the ValidityState
interface indicates if the value of an input, after having been edited by the user, does not conform to the constraints set by the element's max
attribute.
The read-only rangeUnderflow
property of the ValidityState
interface indicates if the value of an input, after having been edited by the user, does not conform to the constraints set by the element's min
attribute.
The read-only stepMismatch
property of the ValidityState
interface indicates if the value of an input, after having been edited by the user, does not conform to the constraints set by the element's step
attribute.
The read-only typeMismatch
property of the ValidityState
interface indicates if the value of an input, after having been edited by the user, does not conform to the constraints set by the element's type
attribute.
The read-only valueMissing
property of the ValidityState
interface indicates if a required
control, such as an input, select, or textarea, has an empty value.