Until now, I've used jQuery validation plugin with previously defined fields. Now I'm working with a dynamic form. Fields have their validation needs mapped by its classes (e.g. " required "), but I don't see how to customize the messages jQuery validate throws.
+4
A:
$.validator.messages.required = "My new, default required message!";
Craig Stuntz
2009-09-03 12:50:22
+7
A:
you can add your messages like so.
$.extend($.validator.messages, {
required: "your msg",
email: "your email msg",
digits: "your digits msg"
});
See setDefaults
Bjarki Heiðar
2009-09-03 12:50:26
A:
I am also using $.extend($.validator.messages, {, but my errormessages are dynamic which are stored in attrbiute of my control ,now i want to retrieve the attribute here,something like $(element).attr('ErrorMessage')
but it is not working
Punit
2009-11-20 10:19:13