An HTML5 form validation plugin for jQuery. Works on all major browsers, both new and old. Implements inline, realtime validation best practices (based on surveys and usability studies). Developed for production use in e-commerce. Currently in production with millions of users.
Something like
I think all you need is this line of code:
Not sure if such use of required attribute is in html5 spec though. Could be made optional.