I have a simple check method based on a input mask defining all allowed char classes:
<input type="text" required inputmask="254" name="test"/>
I wrote a function checking the input value characters against the inputmask and it works fine.
Now, I want to give the user a feedback, thus I defined my message:
$.validator.messages.inputmask = $.validator.format("no, no: input mask is {0}");
But I would prefer to have a function, building the list of accepted characters based on the mask and use this for feedback, i.e. I want to 'manipulate' the parameter:
$.validator.messages.inputmask = myFunc("hey dude, you are just allowed to use {0}", getChars(dont_know_which_param_to_reference_here);
This my JSFiddle: Input Mask Validation (all classes but uppercase accepted)
As you can see the param is nice to check against the mask but can't be used as an user feedback.
Is there any way to do so? Any kind of ideas?
Thanks a lot!
<input>tag is "self-closing". In other words, there is no such thing as a</input>tag. Simply use<input />.