How can I check for exact length using jQuery Validation?

后端 未结 4 1156
悲哀的现实
悲哀的现实 2021-02-05 04:15

Using the jQuery Validation plugin to validate forms, how would you confirm that a string is exactly X characters long?

4条回答
  •  [愿得一人]
    2021-02-05 04:32

    The easiest way is to use the existing validation methods via data attributes, then just set your own validation message for clarity.

    
    

提交回复
热议问题