I have created a separate function in my script to set the proper error messages.
function addCustomMessages(){ $("#inputName").rules("add", { messages: { required: errorRequired, minlength: errorMinLength } }); }
where errorRequired and errorMinLength are global variables that holds the localized messages.
The function will be called every time the language is changed.
Works like magic. :)
I'll try to add a fiddle next time to further clarify.
Other helpful links:
The function will be called every time the language is changed.
$("#languageSelector").change(function(){ // code here to get the translations addCustomMessages(); // code that will load the messages for the jQuery validation plugin });
Works like magic. :)
I'll try to add a fiddle next time to further clarify.
Other helpful links:
No comments:
Post a Comment