I want to implement simple jquery mask pluging using jquery input.mask plugin, however, i cannot make it work with regex. What i want to achieve is:
99:59:59
Fiddle
You can do it like this.
$("#test").inputmask({
mask: "99:59:59",
definitions: {'5': {validator: "[0-5]"}}
});
The validator is an expression. Telling the "5" in the mask string to contain only numerical characters from 0 to 5.
edit: changed '-' to ':'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With