Using depends with the jQuery Validation plugin

前端 未结 8 549
[愿得一人]
[愿得一人] 2021-01-12 11:52

I\'ve got a form with a bunch of textboxes that are disabled by default, then enabled by use of a checkbox next to each one.

When enabled, the values in these textbo

8条回答
  •  自闭症患者
    2021-01-12 12:47

    Depends parameter is not working correctly, I suppose documentation is out of date. I managed to get this working like this:

    required : function(){ return $("#register").hasClass("open")}
    

提交回复
热议问题