jQuery disable rule validation on a single field

前端 未结 5 2016
说谎
说谎 2020-11-28 04:35

I am using MVC to create forms that are generated at runtime. For validation, I am trying my hand at the jQuery validation library which is very convenient to use. I have th

5条回答
  •  误落风尘
    2020-11-28 05:07

    Just add the ignore rule and define the selector. In this example, the validation will ignore all elements that have the class="ignore"

    $("#myform").validate({
       ignore: ".ignore"
    })
    

提交回复
热议问题