Prechádzať zdrojové kódy

伊宁项目更改相关 统一app相关 变更用户密码校验规则

1037015548@qq.com 1 rok pred
rodič
commit
d7c33cf63f

+ 12 - 4
ruoyi-admin/src/main/resources/templates/system/user/profile/profile.html

@@ -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,