HTMLSelectElement.checkValidity()

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.

Syntax

var result = selectElt.checkValidity();

Specifications

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

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
checkValidityChrome Full support 4Edge Full support 12Firefox Full support 4IE Full support 10Opera Full support 9Safari Full support 5WebView Android Full support ≤37Chrome Android Full support 18Firefox Android Full support 4Opera Android Full support 10.1Safari iOS Full support 4.2Samsung Internet Android Full support 1.0

Legend

Full support
Full support

See also