Button formNoValidate Property
Example
Find out if the form-data should be validated or not:
var x = document.getElementById("myBtn").formNoValidate;
The result of x could be:
true // the form-data should not be
validated on submission
Try it Yourself »
Definition and Usage
The formNoValidate property sets or returns whether the form-data should be validated or not, on submission.
This property is only used for buttons with type="submit".
When set to true, this property adds the "formnovalidate" attribute to the "submit" button, and specifies that the form-data should not be validated on submission. This overrides the form's novalidate attribute.
Note: The formnovalidate attribute is new for the <button> element in HTML5.
Browser Support
The formNoValidate property is supported in all major browsers.
Note: The formNoValidate property is not supported in Internet Explorer 9 and earlier versions.
Syntax
Return the formNoValidate property:
buttonObject.formNoValidate
Set the formNoValidate property:
buttonObject.formNoValidate=true|false
Property Values
Value | Description |
---|---|
true|false |
Specifies whether the form-data should be validated or not, on
submission
|
Technical Details
Return Value: | A Boolean, returns true if the form-data should not be validated, otherwise it returns false |
---|
More Examples
Example
Set the formNoValidate property:
document.getElementById("myBtn").formNoValidate = false;
Try it Yourself »
Related Pages
HTML reference: HTML <button> formnovalidate attribute
Button Object