From e7c5d7d0988b12389c50f40366c58fd61ba1ee94 Mon Sep 17 00:00:00 2001 From: Aether Date: Sun, 28 Sep 2025 17:34:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=97=B6=E5=88=86=E6=A0=A1?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E5=BF=85=E4=BC=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Validator/CampusValidator.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Validator/CampusValidator.php b/app/Validator/CampusValidator.php index 78149ac..c4967bc 100644 --- a/app/Validator/CampusValidator.php +++ b/app/Validator/CampusValidator.php @@ -33,7 +33,7 @@ class CampusValidator extends AetherValidator 'update' => [ 'rules' => [ 'id' => 'required|integer|min:1', - 'name' => 'nullable|string|max:255', + 'name' => 'required|string|max:255', 'parent_id' => 'nullable|integer|min:0', 'level' => 'nullable|integer|in:1,2,3', 'province' => 'nullable|string|max:100', @@ -42,6 +42,7 @@ class CampusValidator extends AetherValidator ], 'messages' => [ 'id.required' => '校区ID不能为空', + 'name.required' => '校区名称不能为空', 'level.in' => '层级只能是1、2、3', ], ],