修改了重复密码验证的js,精简代码量,减少了重复的校验,减少了valuedator中confirm的参数 [ci skip]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
};
|
||||
}));
|
||||
|
||||
Reference in New Issue
Block a user