|
@ -85,8 +85,8 @@ |
|
|
public function validateAttribute($model, $attribute) |
|
|
public function validateAttribute($model, $attribute) |
|
|
{ |
|
|
{ |
|
|
$blackList='kuangweijian'; |
|
|
$blackList='kuangweijian'; |
|
|
$ret = in_array($blackList, $model->attributes); |
|
|
|
|
|
if($ret){ |
|
|
|
|
|
|
|
|
if(in_array($blackList, $model->attributes)) //判断黑名单是否在属性数组中
|
|
|
|
|
|
{ |
|
|
$this->addError($model, $attribute,"{$blackList}属于黑名单人员"); |
|
|
$this->addError($model, $attribute,"{$blackList}属于黑名单人员"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|