From e4e7e5758068648f867405780f56ae0dea31586e Mon Sep 17 00:00:00 2001 From: WispX Date: Wed, 28 Jul 2021 10:21:39 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20=E4=BF=AE=E5=A4=8D=20BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- application/common/validate/Users.php | 2 ++ application/lang/en.php | 2 ++ application/lang/zh-cn.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/application/common/validate/Users.php b/application/common/validate/Users.php index 7ed33a69..3259f0b1 100644 --- a/application/common/validate/Users.php +++ b/application/common/validate/Users.php @@ -23,7 +23,9 @@ class Users extends Validate protected $message = [ 'username.require' => '{%User name cannot be empty}', + 'username.min' => '{%The user name cannot be less than three characters}', 'username.max' => '{%The user name character length exceeds the limit}', + 'username.alphaDash' => '{%User names can only be letters, numbers, and underscores_ And dash-}', 'username.unique' => '{%User name already exists, please replace}', 'nickname.max' => '{%The length of nickname characters exceeds the limit}', 'default_folder.max' => '{%Default upload folder name length exceeds limit}', diff --git a/application/lang/en.php b/application/lang/en.php index c07dea43..9468e05c 100644 --- a/application/lang/en.php +++ b/application/lang/en.php @@ -324,6 +324,8 @@ return [ 'The maximum length of the role group name is 30 characters' => 'The maximum length of the role group name is 30 characters', 'The role group name can only be Chinese characters, letters and numbers' => 'The role group name can only be Chinese characters, letters and numbers', 'User name cannot be empty' => 'User name cannot be empty', + 'The user name cannot be less than three characters' => 'The user name cannot be less than three characters', + 'User names can only be letters, numbers, and underscores_ And dash-' => 'User names can only be letters, numbers, and underscores_ And dash-', 'The user name character length exceeds the limit' => 'User name character length exceeds', 'User name already exists, please replace' => 'User name already exists, please replace', 'The length of nickname characters exceeds the limit' => 'Nickname character length exceeds', diff --git a/application/lang/zh-cn.php b/application/lang/zh-cn.php index 59c59071..ac21e7dc 100644 --- a/application/lang/zh-cn.php +++ b/application/lang/zh-cn.php @@ -324,6 +324,8 @@ return [ 'The maximum length of the role group name is 30 characters' => '角色组名称长度最大30个字符', 'The role group name can only be Chinese characters, letters and numbers' => '角色组名称只能是汉字、字母和数字', 'User name cannot be empty' => '用户名不能为空', + 'The user name cannot be less than three characters' => '用户名不能少于三个字符', + 'User names can only be letters, numbers, and underscores_ And dash-' => '用户名只能是字母、数字和下划线_及破折号-', 'The user name character length exceeds the limit' => '用户名字符长度超出', 'User name already exists, please replace' => '用户名已存在,请更换', 'The length of nickname characters exceeds the limit' => '昵称字符长度超出',