I'm trying to validate the mask.
Once the mask format has been completed, try to change the value again, but the validation message was not correct.
$('#pin').igMaskEditor({ placeHolder: 'Enter your PIN', inputMask: '\\00-0000-0000', validatorOptions: { errorMessage: 'Error', required: true, onblur: true, onchange: true, onsubmit: true, notificationOptions: { mode: "inline" } } });
attached test link:
http://jsfiddle.net/vjeu49ka/
Hello,
Thank you for contacting the Infragistics support!
Can you please provide the exact steps to reproduce the described issue as I was not able to reproduce it?
What I was trying to do is:
1.) Enter 344444444
2.) Blur the editor (03-4444-4444 is set)
3.Click inside to enter edit mode (the value is selected)
4.) Enter 566666666
5.) Blur the editor (05-6666-6666 I set)
I am looking forward to your response!
Hello, Steps
1) I position myself in
2) enter this value 02-2222-2222
3) I click outside the input
4) change the value by 2345) I click outside the input, and the error message is different from the one I had putI had put the validation message as ("error"), but he ignored it and put this message ("All required positions should be filled, that is why the value was reverted to the last valid one")
that is my problem, that the validation message is changing.
Thank you for the provided explanation!
You may achieve the desired behavior by setting the 'revertIfNotValid' option to false.\
Your editor would look like this:
$('#pin').igMaskEditor({ placeHolder: 'Enter your PIN', inputMask: '\\00-0000-0000', revertIfNotValid : false, validatorOptions: { errorMessage: 'Error', required: true, onblur: true, onchange: true, onsubmit: true, notificationOptions: { mode: "inline" } } });
If you have any other questions regarding this case - do not hesitate to contact us again!
Best regards,Alexander