News for hackers. Stuff that matters.
Re:Show HN: a small jQuery Form Validation library by waxjar on Sunday November 04, 2012 @11:38AM (#4740149)
I'd prefer a library that reads its parameters from HTML5 attributes (such as required, maxlength, pattern, etc). That would bring support for client side form validation to browsers that don't natively support it. Ideally this would be as simple as loading a javascript file with <script> tags.

It would also be much easier to use, because there would be no API to "learn".

Re:Show HN: a small jQuery Form Validation library by th on Sunday November 04, 2012 @11:57AM (#4740212)
This is a great idea. It looks like there are at least two plugins already that claim to validate the new HTML5 attributes: [html5-form][1] and [h5Validate][2]

[1]: http://www.matiasmancini.com.ar/jquery-plugin-ajax-form-vali...

[2]: http://ericleads.com/h5validate/

Re:Show HN: a small jQuery Form Validation library by BozeWolf on Sunday November 04, 2012 @01:11PM (#4740426)
Like how angularjs works with directives? In angular you can create your own directives (HTML elements, so to say). You can add attributes to these directives. In this directive simply check if the browser supports the HTML5 element. if(this_is_true): render_this_element() else: mimic_behaviour().
Re:Show HN: a small jQuery Form Validation library by pags on Sunday November 04, 2012 @06:07PM (#4741443)
https://github.com/pags/fields.js

Give it a look. As you described, it simply parses standard input tag params, including HTML 5 types. It's my first attempt at anything like this, so be gentle.