jquery validatie if statement

Posted by Mariana Hernandez on Stack Overflow See other posts from Stack Overflow or by Mariana Hernandez
Published on 2013-10-25T15:52:04Z Indexed on 2013/10/25 15:53 UTC
Read the original article Hit count: 195

Filed under:
|
|

i have this validate function:

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"
}

i need to apply the same if statement in the "equalTo" fuction so this can work as i want to, but i dont know how to do that.

Dows anyone knows? Thanks

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about html