Disable HTML5 Validation


Disable HTML5 Validation : Sometimes we need to disable the client side HTML5 Default validation. You can use novalidation attribute to disable the HTML5 validation. Here in this tutorial We are going to explain how you can disable the HTML5 Default validation.


Disable HTML5 Validation

You can disable the default validation in HTML5 as below –

Disable Validation For All Form Elements

If You want to disable the validation for all elements of the form add the novalidate attribute in the form tag which will disable the validation for entire form.

Disable HTML5 Validation for Form Example

<form novalidate>
    <!--none of the below will be validated-->
    <input type="email"/> 
    <input type="url"/>
    <input type="submit" value="Submit">	
</form>

Try it »

If you run the above example it will produce the following output –

Disable HTML5 Validation for Form Example

Disable Validation For All Form Elements

If You want to disable the validation for few elements of the form add the novalidate attribute in the elementtag which will disable the validation for that form element.

Disable HTML5 Validation for Form Example

<form>
    <!--validation disabled for email only-->
    <input type="email" novalidate/> 
    <input type="url"/>
    <input type="submit" value="Submit">	
</form>

Try it »


Advertisements

Add Comment