validator ========= The Validator is cross-browser and will give you the power to use future-proof input types such as `tel`, `email`, `number`, `date`, `time`, `checkbox` and `url`. # [DEMO PAGE](http://yaireo.github.io/validator) ### Why should you use this? * Cross browser validation * Deals with all sorts of edge cases * Utilize new HTML5 types for unsupported browsers * Flexible error messaging system * Light-weight (19kb + comments, unminified) ## Validation types support HTML5 offers a wide selection of input types. I saw no need to support them all, for example, a checkbox should not be validated as ‘required’ because why wouldn’t it be checked in the first place when the form is rendered? For a full list of all the available Types, visit the working draft page. These input types can be validated by the the JS for – ``. (Support is synthesized) * Text * Email * Password * Number * Date * Time * URL * Search * File * Tel * Checkbox * Select * Textarea * Hidden – Hidden fields can also have the ‘required’ attribute ## Basic semantics
?

Name must be at least 2 words

... ### Explaining the DOM First, obviously, there is a Form element with the novalidate attribute to make sure to disable the native HTML5 validations (which currently suck). proceeding it there is a Fieldset element which is not a must, but acts as a “binding” box for a group of fields that are under the same “category”. For bigger forms there are many times field groups that are visually separated from each other for example. Now, we treat every form field element the user interacts with, whatsoever, as an “field”, and therefor these “fields” will be wraped with `
`. This isolation gives great powers. Next, inside an field, there will typically be an input or select or something of the sort, so they are put inside a `