HTMLObjectElement.setCustomValidity

The setCustomValidity() method of the HTMLObjectElement interface sets a custom validity message for the element.

Syntax

HTMLObjectElement.setCustomValidity(message);

Parameters

error
The message to use for validity errors.

Return value

undefined

Exceptions

None.

Specifications

Specification Status Comment
HTML Living Standard
The definition of 'setCustomValidity' in that specification.
Living Standard Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
setCustomValidityChrome Full support YesEdge Full support 12Firefox Full support 1IE Full support YesOpera Full support YesSafari Full support 6WebView Android Full support YesChrome Android Full support YesFirefox Android Full support 4Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android ?

Legend

Full support  
Full support
Compatibility unknown  
Compatibility unknown

Document Tags and Contributors

Contributors to this page: jpmedley
Last updated by: jpmedley,