Customizing inline validation messages
-
Hi,
I’m trying on changing validation error messages, but I get always default messages. I would want to customize required, email and date validation messages. How shall I procede?
I tried to use the same approach you use for captcha message, but I’m not lucky.
I don’t know jQuery very well and maybe I’m getting lost in a glass of water, but this is what I’ve done:
1) I’ve added a class to elements by their id (is it possible to add by something less specific, I mean, is it possible to get the label of the field or something?)$("#entry_6").addClass("gform-date");
2) I’ve added a class rule to the class
$.validator.addClassRules("gform-date", { date: true });
3) then I try to put messages on validate’s options, but no way of having these messages
$("#ss-form").validate({ errorClass: "gform-error", messages: { date: "Custome message!" } }) ;
How can I make it work?
- The topic ‘Customizing inline validation messages’ is closed to new replies.