THE WORLD'S LARGEST WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

Button formNoValidate Property

Button Object Reference Button Object

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

Internet Explorer Firefox Opera Google Chrome Safari

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
  • true - The form-data should not be validated
  • false - Default. The form-data should be validated

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 Reference Button Object