修改了重复密码验证的js,精简代码量,减少了重复的校验,减少了valuedator中confirm的参数 [ci skip]

This commit is contained in:
sxw
2015-08-04 19:54:44 +08:00
parent 1d4af5cc7c
commit 0b55f6bbf7
5 changed files with 14 additions and 64 deletions

View File

@@ -22,13 +22,11 @@
}
}
});
FormValidation.Validator.confirm = {
validate: function(validator, $field, options) {
if (options.firstPassword.val() == options.secondPassword.val() ||options.secondPassword.val()== '')
return true;
return false;
}
if (options.original.val() == $field.val() || $field.val()== '')
return true;
return false;
}
};
}));