2. $ whois
• Hi, I’m Ian
• Web / Application Developer at Sage
• http://ianoxley.com
• @ianoxley
3. this.talk
• HTML5 client-side <form> validation
• New <input> types and attributes make
this really easy
• (Still need to perform validation on the
server)
4. HTML4
• Client-side validation requires JavaScript
• Custom code, jQuery validate, etc.
• Extra work to give user optimal UX
5. • New <input> types and
attributes
• Browsers have built-in
client-side validation
17. JavaScript fallback...
• Modernizr library for HTML5 detection
if (!Modernizr.input.required) {
// Validate the old-fashioned way
setValidationFallback();
}
18. Can also be used...
• In browser extensions
• Greasemonkey scripts
• Prototyping / designing in the browser
19. Further info
• A Form of Madness
http://diveintohtml5.org/forms.html
• Forward Thinking Form Validation
http://www.alistapart.com/articles/forward-thinking-form-
validation/
• New Form Features in HTML5
http://dev.opera.com/articles/view/new-form-features-in-html5/
• Modernizr JavaScript Library
http://www.modernizr.com/