jquery masked input plugin to not clear field when errored

后端 未结 7 795
难免孤独
难免孤独 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.

    0 讨论(0)
提交回复
热议问题