modify plugin name

This commit is contained in:
2022-03-01 18:14:03 +08:00
parent 83e4c8a5ba
commit 60cd694671
+2 -5
View File
@@ -47,12 +47,9 @@ class TypesOfValidator extends BaseValidator
if (!in_array($method, $types)) {
return true;
}
if (!isset($params[$field])) {
return true;
}
$value = $params[$field] ?? null;
if (empty($value)) {
return $this->addError($field, 'This ' . $field . ' is not an empty data.');
if (is_null($value)) {
return true;
}
return $this->{$method . 'Format'}($field, $value);
}, $this->params, $this->method, $this->types);