Glossary Term
HTMLInputElement.checkValidity()
The checkValidity() method of the HTMLInputElement interface returns a boolean value which indicates if the element meets any constraint validation rules applied to it. If false, the method also fires an invalid event on the element. Because there’s no default browser behavior for checkValidity(), canceling this invalid event has no effect.
Note: An HTML input element with a non-null validationMessage is considered invalid, will match the CSS :invalid pseudo-class, and will cause checkValidity() to return false. Use the HTMLInputElement.setCustomValidity() method to set the HTMLInputElement.validationMessage to the empty string to set the validity state to be valid.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
