Disable HTML5 input native validation
Tue, Aug 12, 2014
HTML5 Programming #HTML5 #programming
In HTML5, we can now specify extra attribute to the input element, such as pattern, required and type. By default, browser will validate the form whenever user submit the form. If you are using third party Javascript validation tools like Parsley or JQuery Validation plugin, you will want to disable the browser validation. To disable it, we can just add a “novalidate” attribute to the form.
<form action="youraction.php" method="post" novalidate> <div><input type="email" required name="email" placeholder="Email"/></div> <div><input type="submit" value="Submit"></div> </form>
Here are some sample codes I written in jsfiddle. I’ve created 2 forms, one with novalidate and one without novalidate. You can try it out and see. Enjoy.
Product Catalog Application using Play and Scala Part 7 – View and template
Why people stopped practicing Scrum