The HTMLSelectElement.checkValidity()
method checks whether the element has any constraints and whether it satisfies them. If the element fails its constraints, the browser fires a cancelable invalid
event at the element, and then returns false
.
var result = selectElt.checkValidity();
Specification | Status | Comment |
---|---|---|
HTML Living Standard The definition of 'HTMLSelectElement.checkValidity()' in that specification. | Living Standard | No change since the latest snapshot, HTML5. |
HTML5 The definition of 'HTMLSelectElement.checkValidity()' in that specification. | Recommendation | Initial definition, snapshot of HTML Living Standard |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | Yes | Yes | 4 | 10 | Yes | Yes |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | ? | Yes | Yes | 4 | ? | Yes | ? |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLSelectElement/checkValidity