From 26016534a86d17b14864e39cf1aa44d9b20825ca Mon Sep 17 00:00:00 2001 From: "HDM58\\hdm58" Date: Sat, 17 Feb 2024 15:09:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=91=98=E5=B7=A5=E5=A7=93?= =?UTF-8?q?=E5=90=8D=E8=87=B3=E5=B0=91=E6=98=AF=E4=B8=A4=E4=B8=AA=E6=B1=89?= =?UTF-8?q?=E5=AD=97=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/user/validate/AdminCheck.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/user/validate/AdminCheck.php b/app/user/validate/AdminCheck.php index bae92ce..5b32565 100644 --- a/app/user/validate/AdminCheck.php +++ b/app/user/validate/AdminCheck.php @@ -29,7 +29,7 @@ class AdminCheck extends Validate } protected $rule = [ - 'name' => 'require|chs', + 'name' => 'require|chs|min:2', 'username' => 'require|regex:checkUser', 'mobile' => 'require|mobile|checkUnique:Admin,mobile,id', 'email' => 'require|email|checkUnique:Admin,email,id', @@ -47,6 +47,7 @@ class AdminCheck extends Validate protected $message = [ 'name.require' => '员工姓名不能为空', 'name.chs' => '员工姓名只能是汉字', + 'name.min' => '员工姓名至少是两个汉字', 'username.require' => '登录账号不能为空', 'username.regex' => '登录账号必须是以字母开头,只能包含字母数字下划线和减号,4到20位', 'mobile.require' => '手机不能为空',