jquery validation rules

后端 未结 3 1239
闹比i
闹比i 2020-12-19 15:22
  1. My phone validation depends on a checkbox (no, don\'t contact me via phone). If this is checked, then I will not need run the phone validation. I googled around and fo
3条回答
  •  执笔经年
    2020-12-19 16:03

    I think you want your dependency specified using proper selector syntax:

    required: {
        depends: "#pri_noPhone:not(:checked)"
    }
    

    EDIT

    Steve's answer on the email:

    confirmEmail: {
        required:true,
        equalTo: "#email"
    },
    

提交回复
热议问题