jquery - Input mask should accept five digits also -
i using jquery input mask plugin like:
var s = jquery.noconflict(); s(document).ready(function () { s(".zipmask").mask('99999-9999'); });
it accepts numbers 12345-1111 , works fine. want should support 5 digits if enter "12345" only, should accept it.
you must use way: after '?' optional.
s(function(){ s(".zipmask").mask("99999?-9999"); });
Comments
Post a Comment