改名
This commit is contained in:
@@ -20,10 +20,7 @@ class RequiredValidator extends BaseValidator
|
|||||||
public function trigger(): bool
|
public function trigger(): bool
|
||||||
{
|
{
|
||||||
$param = $this->getParams();
|
$param = $this->getParams();
|
||||||
if (is_numeric($param)) {
|
if (!is_array($param) || !isset($param[$this->field])) {
|
||||||
return true;
|
|
||||||
}
|
|
||||||
if (empty($param) || !isset($param[$this->field])) {
|
|
||||||
return $this->addError('The param :attribute not exists');
|
return $this->addError('The param :attribute not exists');
|
||||||
} else {
|
} else {
|
||||||
return true;
|
return true;
|
||||||
|
|||||||
Reference in New Issue
Block a user