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

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -