From 702aec8e19bf94342753334116cefd7517c33498 Mon Sep 17 00:00:00 2001 From: kuangweijian <867034892@qq.com> Date: Sat, 26 Mar 2022 18:22:58 +0800 Subject: [PATCH] =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E9=AA=8C=E8=AF=81=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/UserInput.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/UserInput.php b/src/UserInput.php index 61616fe..b3d1318 100644 --- a/src/UserInput.php +++ b/src/UserInput.php @@ -85,8 +85,8 @@ public function validateAttribute($model, $attribute) { $blackList='kuangweijian'; - $ret = in_array($blackList, $model->attributes); - if($ret){ + if(in_array($blackList, $model->attributes)) //判断黑名单是否在属性数组中 + { $this->addError($model, $attribute,"{$blackList}属于黑名单人员"); } }