jQuery Validation: Changing Rules Dynamically

后端 未结 10 912
栀梦
栀梦 2020-12-07 13:07

I have a single form that, depending on which radio button is clicked (Login or Signup), displays either:

  • email address
  • password

or:

10条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-07 14:00

    the below code is working superb...

    .validate({
      ignore: ":not(:visible),:disabled",
      ...
    

提交回复
热议问题