modify plugin name

This commit is contained in:
2022-02-18 17:16:45 +08:00
parent 1acf3fb48b
commit ba410c90da
13 changed files with 182 additions and 178 deletions
+7 -5
View File
@@ -19,11 +19,13 @@ class RequiredValidator extends BaseValidator
*/
public function trigger(): bool
{
if (!isset($this->params[$this->field])) {
return $this->addError('The param :attribute not exists');
} else {
return true;
}
return $this->_validator($this->field, function ($field, $params) {
if (!isset($params[$field])) {
return $this->addError('The param :attribute not exists');
} else {
return true;
}
});
}
}