I have a simple validation method based on an input mask that defines all valid char classes:
<input type="text" required inputmask="254" name="test"/>
I wrote a function that checks characters of input values ββfor an input mask, and it works great.
Now I want to give the user feedback, so I defined my message:
$.validator.messages.inputmask = $.validator.format("no, no: input mask is {0}");
But I would rather have a function by creating a list of accepted characters based on the mask and use it for feedback, i.e. I want to "manipulate" a parameter:
$.validator.messages.inputmask = myFunc("hey dude, you are just allowed to use {0}", getChars(dont_know_which_param_to_reference_here);
This is my JSFiddle: Checking masking of input files (all classes, but accepted in upper case)
As you can see, couples are pleased to check the mask, but cannot be used as user feedback.
Is there any way to do this? Any ideas?
Thanks a lot!
source share