Form noValidate Property

Definition and Usage

noValidate Property to set or return whether form data should be validated when submitted.

By default, form data in the <form> element will be validated when submitted.

When set to true, this property adds the "novalidate" attribute to the <form> element and specifies that form data should not be validated when submitted.

Note:The novalidate attribute is a new attribute of the <form> element in HTML5.

See also:

HTML Reference Manual:HTML <form> novalidate Attribute

Instance

Example 1

Confirm whether the form data should be validated:

var x = document.getElementById("myForm").noValidate;

Try it yourself

Example 2

Set the noValidate property:

document.getElementById("myForm").noValidate = true;

Try it yourself

Syntax

Return the noValidate property:

formObject.noValidate

Set the noValidate property:

formObject.noValidate = true|false

attribute value

value description
true|false

Specifies whether form data should be validated upon submission.

  • true - Form data should not be validated
  • false - Form data should be validated

Technical Details

Return Value: Boolean value, returns true if form data should not be validated, otherwise returns false.

Browser Support

The numbers in the table indicate the first browser version that fully supports this attribute.

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Supported 10.0 Supported Not Supported Supported