News for hackers. Stuff that matters.
Re:Show HN: a small jQuery Form Validation library by evx on Sunday November 04, 2012 @09:11AM (#4739810)
Neat. But I don't understand why you used strings as part of the validation?

The "min_length(6)|required" isn't actual javascript code is it?

Would passing an object be better?

For example,

userForm.addValidation("username", "min_length(6)|required");

Becomes,

userForm.addValidation("username", {min_length:6, required:true});

Did I misunderstand something?

Re:Show HN: a small jQuery Form Validation library by jackfranklin on Sunday November 04, 2012 @10:59AM (#4740052)
Hey,

Thank you so much for this. I've no idea why I didn't think of this initially - but I've now rewritten the plugin to do this instead. Hope you like it - and thanks again!

Jack

Re:Show HN: a small jQuery Form Validation library by evx on Sunday November 04, 2012 @11:11AM (#4740078)
Great job! Gotta love the responsiveness. I hope you keep making it better.
Re:Show HN: a small jQuery Form Validation library by FuzzyDunlop on Sunday November 04, 2012 @11:05AM (#4740068)
This change appears to have been pushed already. Can't fault the responsiveness!
Re:Show HN: a small jQuery Form Validation library by mikeburrelljr on Sunday November 04, 2012 @09:20AM (#4739825)
{yes: 'please'}
Re:Show HN: a small jQuery Form Validation library by jackfranklin on Sunday November 04, 2012 @10:13AM (#4739957)
I modelled it off the way CodeIgniter validations as I always liked how they worked - but thinking about it this is a great idea - going to make this change sometime soon :)

Thanks!