Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

When to use the novalidate attribute in HTML Form ?

  • Last Updated : 14 Jan, 2022

The HTML novalidate attribute is a boolean attribute used to specify that the form-data should not be validated when submitting the form. It can be used with the HTML <form> element. 

It can be used in situations where you want the user to save the progress of form filing. or If the form validation is disabled, the user can easily save the form and continue & submit the form later.

Syntax:

<form novalidate>

Below example illustrates the novalidate attribute in HTML:

Example:

HTML




<!DOCTYPE html>
<html>
  
<body style="text-align:center;">
    <h1 style="color:green;">
        GeeksforGeeks
    </h1>
  
    <h2>
        When to use the novalidate 
        attribute in the HTML Form?
    </h2>
  
    <form action="#"
          method="get"
          target="_self" 
          novalidate>
        Name:
        <input type="text">
        <input type="submit"
            id="Geeks"
            name="myGeeks"
            value="Submit @ geeksforgeeks"
            formTarget="_blank">
    </form>
</body>
</html>

Output:

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!