HTMLSelectElement: checkValidity() method - Web APIs | MDN (original) (raw)
Syntax
Parameters
None.
Return value
Returns true if the element's value has no validity problems; otherwise, returns false.
Examples
In the following example, calling checkValidity() returns either true or false.
const element = document.getElementById("mySelect");
console.log(element.checkValidity());
Specifications
| Specification |
|---|
| HTML # dom-cva-checkvalidity-dev |