|
|
|
|
|
by evx
5141 days 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? |
|
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