modify plugin name

This commit is contained in:
2022-03-01 16:38:22 +08:00
parent 74eac11f6c
commit e2bdf81267
+2 -1
View File
@@ -21,7 +21,8 @@ class EnumValidator extends BaseValidator
{ {
return $this->_validator($this->field, function ($field, $params, $values) { return $this->_validator($this->field, function ($field, $params, $values) {
if (!in_array($params[$field] ?? null, $values)) { if (!in_array($params[$field] ?? null, $values)) {
return $this->addError($field, 'The param :attribute value(' . $params[$field] . ') only in ' . implode(',', $values)); $message = 'The param :attribute value(' . $params[$field] . ') only in ' . implode(',', $values);
return $this->addError($field, $message);
} }
return true; return true;
}, $this->params, $this->value); }, $this->params, $this->value);