|
@@ -245,7 +245,17 @@
|
|
|
$.operate.saveModal(ctx + "system/user/profile/update", $('#form-user-edit').serialize());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ $.validator.addMethod("pwdMatch",function(value,element,params){
|
|
|
+ //强密码正则表达式-大小写字母、数字、符号三种类型组合的密码,长度至少为8位
|
|
|
+ var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
|
|
|
+ if(strongRegex.test(value)) {
|
|
|
+ return true;
|
|
|
+ }else {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },"请使用大小写字母、数字、符号三种类型组合的密码,长度至少为8位。");
|
|
|
+
|
|
|
/*用户管理-修改密码*/
|
|
|
$("#form-user-resetPwd").validate({
|
|
|
onkeyup: false,
|
|
@@ -264,9 +274,7 @@
|
|
|
}
|
|
|
},
|
|
|
newPassword: {
|
|
|
- required: true,
|
|
|
- minlength: 6,
|
|
|
- maxlength: 20
|
|
|
+ pwdMatch:[]
|
|
|
},
|
|
|
confirmPassword: {
|
|
|
required: true,
|