Latest web development tutorials
 

Form noValidate Property

< 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

Property
noValidate Yes 10.0 Yes Not supported Yes

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