Nida Nida - 11 months ago 82
jQuery Question

Input mask should accept five digits also

I am using jQuery input mask plugin like

var s = jQuery.noConflict();
s(document).ready(function () {

It accepts the numbers like 12345-1111 and works fine.
Now I want that it should support five digits like if we enter "12345" only, It should accept it.

Answer Source

You must use it like this way: Anything after the '?' is optional.