From b6b252f4f72949fc65afca41ca477930393f396e Mon Sep 17 00:00:00 2001 From: RuoYi Date: Tue, 8 May 2018 11:07:50 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E5=AF=86=E7=A0=81=E9=95=BF?= =?UTF-8?q?=E5=BA=A6=E6=A0=A1=E9=AA=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main/java/com/ruoyi/common/constant/UserConstants.java | 2 +- src/main/resources/static/ruoyi/system/user/add.js | 4 +++- src/main/resources/static/ruoyi/system/user/edit.js | 6 ------ src/main/resources/templates/system/user/profile/edit.html | 4 ---- .../resources/templates/system/user/profile/resetPwd.html | 7 ++++--- src/main/resources/templates/system/user/resetPwd.html | 3 ++- 6 files changed, 10 insertions(+), 16 deletions(-) diff --git a/src/main/java/com/ruoyi/common/constant/UserConstants.java b/src/main/java/com/ruoyi/common/constant/UserConstants.java index fcf8e625..2677badf 100644 --- a/src/main/java/com/ruoyi/common/constant/UserConstants.java +++ b/src/main/java/com/ruoyi/common/constant/UserConstants.java @@ -27,7 +27,7 @@ public class UserConstants * 用户名长度限制 */ public static final int USERNAME_MIN_LENGTH = 2; - public static final int USERNAME_MAX_LENGTH = 10; + public static final int USERNAME_MAX_LENGTH = 20; /** 名称是否唯一的返回结果码 */ public final static String NAME_UNIQUE = "0"; diff --git a/src/main/resources/static/ruoyi/system/user/add.js b/src/main/resources/static/ruoyi/system/user/add.js index 79a652ce..5e4e5703 100644 --- a/src/main/resources/static/ruoyi/system/user/add.js +++ b/src/main/resources/static/ruoyi/system/user/add.js @@ -3,6 +3,7 @@ $("#form-user-add").validate({ loginName:{ required:true, minlength: 2, + maxlength: 20, remote: { url: ctx + "system/user/checkUserNameUnique", type: "post", @@ -26,7 +27,8 @@ $("#form-user-add").validate({ }, password:{ required:true, - minlength: 6 + minlength: 5, + maxlength: 20 }, email:{ required:true, diff --git a/src/main/resources/static/ruoyi/system/user/edit.js b/src/main/resources/static/ruoyi/system/user/edit.js index 49077ed8..7cce7a2f 100644 --- a/src/main/resources/static/ruoyi/system/user/edit.js +++ b/src/main/resources/static/ruoyi/system/user/edit.js @@ -6,10 +6,6 @@ $("#form-user-edit").validate({ deptName:{ required:true, }, - password:{ - required:true, - minlength: 6 - }, email:{ required:true, email:true @@ -27,7 +23,6 @@ function update() { var userId = $("input[name='userId']").val(); var deptId = $("input[name='deptId']").val(); var userName = $("input[name='userName']").val(); - var password = $("input[name='password']").val(); var email = $("input[name='email']").val(); var phonenumber = $("input[name='phonenumber']").val(); var sex = $("input[name='sex']:checked").val(); @@ -42,7 +37,6 @@ function update() { "userId": userId, "deptId": deptId, "userName": userName, - "password": password, "email": email, "phonenumber": phonenumber, "sex": sex, diff --git a/src/main/resources/templates/system/user/profile/edit.html b/src/main/resources/templates/system/user/profile/edit.html index 5fa38c3b..bcf12e7c 100644 --- a/src/main/resources/templates/system/user/profile/edit.html +++ b/src/main/resources/templates/system/user/profile/edit.html @@ -65,10 +65,6 @@ userName:{ required:true, }, - password:{ - required:true, - minlength: 6 - }, email:{ required:true, email:true diff --git a/src/main/resources/templates/system/user/profile/resetPwd.html b/src/main/resources/templates/system/user/profile/resetPwd.html index 645c4bfa..778324c7 100644 --- a/src/main/resources/templates/system/user/profile/resetPwd.html +++ b/src/main/resources/templates/system/user/profile/resetPwd.html @@ -45,7 +45,6 @@ rules:{ oldPassword:{ required:true, - minlength: 6, remote: { url: ctx + "system/user/profile/checkPassword", type: "get", @@ -59,7 +58,8 @@ }, password: { required: true, - minlength: 6 + minlength: 5, + maxlength: 20 }, confirm: { required: true, @@ -73,7 +73,8 @@ }, password: { required: "请输入新密码", - minlength: "密码不能小于6个字符" + minlength: "密码不能小于6个字符", + maxlength: "密码不能大于20个字符" }, confirm: { required: "请再次输入新密码", diff --git a/src/main/resources/templates/system/user/resetPwd.html b/src/main/resources/templates/system/user/resetPwd.html index f008e5c7..b1a49222 100644 --- a/src/main/resources/templates/system/user/resetPwd.html +++ b/src/main/resources/templates/system/user/resetPwd.html @@ -33,7 +33,8 @@ rules:{ password:{ required:true, - minlength: 6 + minlength: 5, + maxlength: 20 }, }, submitHandler:function(form){