Form noValidate Property

Form Object Reference Form Object

Example

Find out if the form-data should be validated or not:

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

The result of x will be:

true // the form-data should not be validated on submission

Try it yourself »

Definition and Usage

The noValidate property sets or returns whether the form-data should be validated or not, on submission.

By default, form-data inside <form> elements will be validated on submission.

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

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


Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

The noValidate property is supported in all major browsers.

Note: The noValidate property is not supported in Internet Explorer 9 and earlier versions.

Note: If you set this property in Safari, it will not have any effect. The novalidate attribute is not supported in Safari.


Syntax

Return the noValidate property:

formObject.noValidate

Set the noValidate property:

formObject.noValidate=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 - 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 noValidate property:

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

Try it yourself »

Related Pages

HTML reference: HTML <form> novalidate attribute


Form Object Reference Form Object

SHARE THIS PAGE

COLOR PICKER

colorpicker