Reputation: 85
I have a form that uses jQuery mask plugin. In most field inputs, it uses masks as "99999-999" and works: The plugin displays the "-" char in the field automatically. The user doesn't need to enter the "-" character. However, when I specify "999,00" it changes the "0" character to accept every number, and that's not what this specific input requires. Is there a way to change it to the literal "0" char, instead of the 0 that means [0-9]?
PS: I already tried to use mask translation. Instead of displaying the '0' char automatically, it only disallows the input of every char but "0".
$("#foobar").mask("999,00", {translation :
{'0' : {pattern: /0/}}
});
Upvotes: 1
Views: 1481