4 ms·
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
by evx 14y ago
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?
- mikeburrelljr 14y ago{yes: 'please'}
- jackfranklin 14y agoI 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!
- jackfranklin 14y agoHey, 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
- evx 14y agoGreat job! Gotta love the responsiveness. I hope you keep making it better.
- FuzzyDunlop 14y agoThis change appears to have been pushed already. Can't fault the responsiveness!