setCustomValidity
Method of dom/HTMLElementdom/HTMLElement
Syntax
var object = object.setCustomValidity(error);
Parameters
error
- Data-type
- any
String containing a custom message.
Return Value
Returns an object of type DOM NodeDOM Node
Type: HRESULT
This method can return one of these values.
S_OK
Notes
Remarks
The following example sets a custom message if you type “fun” into the input field.
Syntax
Standards information
- HTML5 A vocabulary and associated APIs for HTML and XHTML, Section 4.10.21.3
See also
Related pages
- HTMLObjectElementHTMLObjectElement
- HTMLButtonElementHTMLButtonElement
- HTMLFieldSetElementHTMLFieldSetElement
- HTMLInputElementHTMLInputElement
- HTMLSelectElementHTMLSelectElement
- HTMLTextAreaElementHTMLTextAreaElement
Attributions
Microsoft Developer Network: [Windows Internet Explorer API reference Article]