The Current State of HTML5 Forms

The novalidate Attribute

<form novalidate>
  <input type=number name=num step=5>
</form>

Live Demo (with novalidate)

"4" would fail validation.



Live Demo (without novalidate)

"4" would fail validation.



Firefox
4+
Safari
5-
Safari Mobile
5-
Chrome
6+
Opera
10.6+
IE
10+
Android
2.3
Supported No support No support Supported Supported Supported No support

The Low Down

novalidate if a form-level attribute used to turn off validation for a form, despite the attributes of the inputs it contains (i.e. will override inputs with the required attribute, or that would otherwise fail validation).

  • Forms naturally validate, no special attributes needed. This special attribute is needed to turn that off.
  • You might use this if you plan to do your own client-side validation or if you plan to go all server-side validation (which you need to do anyway).
  • Classic example of why server side validation is extra important. One little change in Firebug can force entire form to not need validation and bad data can go through.