我有这个验证功能:
var validator =$('#form1').validate({
ignore: "",
rules: {
usu_login: { required: true },
usu_email: { required: true },
usu_nombre1: { required: true },
usu_apellido1: { required: true },
usu_fecha_nac: { required: true },
usu_cedula: { required: true },
usu_telefono1: { required: true },
usu_password: {
required: function() { return focusout == true; }
},
usu_password2: {
required: function() { return focusout == true; }
},
usu_password3: {
required: function() { return focusout == true; },
equalTo: "#usu_password2"
}
}
}
我需要if
在函数中应用相同的语句,equalTo
以便可以按我的意愿工作,但我不知道该怎么做。
有人知道怎么做吗?谢谢