modify plugin name
This commit is contained in:
@@ -47,12 +47,9 @@ class TypesOfValidator extends BaseValidator
|
|||||||
if (!in_array($method, $types)) {
|
if (!in_array($method, $types)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if (!isset($params[$field])) {
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
$value = $params[$field] ?? null;
|
$value = $params[$field] ?? null;
|
||||||
if (empty($value)) {
|
if (is_null($value)) {
|
||||||
return $this->addError($field, 'This ' . $field . ' is not an empty data.');
|
return true;
|
||||||
}
|
}
|
||||||
return $this->{$method . 'Format'}($field, $value);
|
return $this->{$method . 'Format'}($field, $value);
|
||||||
}, $this->params, $this->method, $this->types);
|
}, $this->params, $this->method, $this->types);
|
||||||
|
|||||||
Reference in New Issue
Block a user