Mandy Singh wrote:
Okay I tried the following and that seems to work - If I assign the validate class to suppose temp then i can do - if (mobile) { temp.settings.messages['phone'] = "mobile"; } if (home) { temp.settings.messages['phone'] = "home"; } Just let me know if this is fine? Seems to work.
Thats is almost what I proposed in the blog comments:
|var messages = { phone: "Please select a phonenumber." } $("#myform").validate({ messages: messages; }); $("#phoneType").change(function() { messages.phone = "Please fill in an appropriate " + this.value + " number”; }); | -- Jörn Zaefferer http://bassistance.de