Quote OP:
"But even though I see that the input attributes changed I still see the old message appears."
That's because once the plugin is initialized, you cannot simply change the jQuery Validate options by changing HTML attributes (as you've learned). Plugin initialization occurs once on page load and never again.
After initialization, you must use methods provided by the plugin to make dynamic changes to rules. See the .rules('add')
method which dynamically adds rule(s)… it will also over-ride a previously defined rule.
Try something more like this…
$("#Donation_Currency").change(function () {
var curr = this.value;
switch (curr) {
case "USD":
$("#Donation_Amount").rules('add', {
range: [36,10000],
messages: {
range: "The field Amount must be between 36 and 10000."
}
});
break;
case "ILS":
$("#Donation_Amount").rules('add', {
range: [100,10000],
messages: {
range: "The field Amount must be between 100 and 10000."
}
});
break;
default:
}
});