Match two fields with jQuery validate plugin

后端 未结 3 1131
小鲜肉
小鲜肉 2020-12-06 03:52

I have an e-mail field, and a confirm e-mail field. I need to validate both of them to make sure their values match.

Is there a way to add a rule to match those two

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-06 04:30

    U can use this

    email: {
          required: true, email: true
          },
    c_email: { 
                    required: true, equalTo: "#email", minlength: 5
              },
    
    
    email
    Confirm email

提交回复
热议问题