modify plugin name
This commit is contained in:
+2
-1
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user