public interface ValidityState
ValidityState
interface represents the validity states that an element can be in, with respect to constraint validation.Modifier and Type | Method and Description |
---|---|
boolean |
isCustomError()
The element's custom validity message has been set to a non-empty string by calling the element's setCustomValidity() method.
|
boolean |
isPatternMismatch()
The value does not match the specified
pattern
. |
boolean |
isRangeOverflow()
The value is greater than the specified
max
. |
boolean |
isRangeUnderflow()
The value is less than the specified
min
. |
boolean |
isStepMismatch()
The value does not fit the rules determined by
step
. |
boolean |
isTooLong()
The value exceeds the specified maxlength for HTMLInputElement or HTMLTextAreaElement objects.
|
boolean |
isTypeMismatch()
|
boolean |
isValid()
No other constraint validation conditions are true.
|
boolean |
isValueMissing()
The element has a
required
attribute, but no value. |
boolean isCustomError()
boolean isPatternMismatch()
pattern
.boolean isRangeOverflow()
max
.boolean isRangeUnderflow()
min
.boolean isStepMismatch()
step
.boolean isTooLong()
The value exceeds the specified maxlength for HTMLInputElement or HTMLTextAreaElement objects.
true
in Gecko, because elements' values are prevented from being longer than maxlength.boolean isTypeMismatch()
boolean isValid()
boolean isValueMissing()
required
attribute, but no value.Copyright © 2016. All rights reserved.