modify plugin name

This commit is contained in:
2022-03-01 16:32:32 +08:00
parent ad4e1743b4
commit 0ef74f1096
+1 -1
View File
@@ -21,7 +21,7 @@ class EnumValidator extends BaseValidator
{
return $this->_validator($this->field, function ($field, $params, $values) {
$value = $params[$field] ?? null;
if (empty($value)) {
if (is_null($value) || $value === '') {
return $this->addError($field,'The param :attribute is null');
}
if (!in_array($value, $values)) {