modify plugin name

This commit is contained in:
2022-02-25 17:12:15 +08:00
parent 14dd7efda6
commit db725b710d
13 changed files with 60 additions and 60 deletions
+2 -2
View File
@@ -22,10 +22,10 @@ class EnumValidator extends BaseValidator
return $this->_validator($this->field, function ($field, $params, $values) {
$value = $params[$field] ?? null;
if (empty($value)) {
return $this->addError('The param :attribute is null');
return $this->addError($field,'The param :attribute is null');
}
if (!in_array($value, $values)) {
return $this->addError('The param :attribute value only in ' . implode(',', $values));
return $this->addError($field,'The param :attribute value only in ' . implode(',', $values));
}
return true;
}, $this->params, $this->value);