jquery masked input plugin to not clear field when errored

后端 未结 7 798
难免孤独
难免孤独 2020-12-29 20:28

I\'m looking at the http://digitalbush.com/projects/masked-input-plugin/

I\'m calling it like this:

$(control).mask(\'999-999-9999\');
7条回答
  •  别那么骄傲
    2020-12-29 21:04

    It looks like I should just make the whole mask optional:

    mask('?999-999-9999')
    

    That way the control thinks what the user has is "valid" and I can continue. Even though it isn't really the optional part of the mask.

提交回复
热议问题