How can I check for exact length using jQuery Validation?

后端 未结 4 1206
悲哀的现实
悲哀的现实 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:35

    example:

    rules : {
    "someFieldName":{digits:true,minlength:20,maxlength:20}
    }
    

提交回复
热议问题