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