Dear community
I’m having a problem with a custom validator, in which different stuff
is validated and a different message is displayed for every failed validation.
Here’s a sample code (everything is in the same rule):
if(result1){
$(‘#startForm’).jqxValidator(‘rules’)[4].message = “Message1”;
return false;
}
if(result2){
$(‘#startForm’).jqxValidator(‘rules’)[4].message = “Message2”;
return false;
}
My problem is:
When Message1 is displayed in a previous validation, then the message still shows “Message1”
even though the code inside result2-block is called.
But in javascript debugger I can see, that jqxValidator(‘rules’)[4].message is correctly set to “Message2”.
Do I need to update the display of the validator or something similar?
Thank you for a hint,
Best regards
Tony