This commit is contained in:
2022-01-09 14:01:11 +08:00
parent 2288ea4778
commit 9fa7d2828c
14 changed files with 1100 additions and 1100 deletions
+29 -29
View File
@@ -1,29 +1,29 @@
<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/3 0003
* Time: 15:47
*/
declare(strict_types=1);
namespace validator;
class RequiredValidator extends BaseValidator
{
/**
* @return bool
* 检查是否存在
*/
public function trigger(): bool
{
if (!isset($this->params[$this->field])) {
return $this->addError('The param :attribute not exists');
} else {
return true;
}
}
}
<?php
/**
* Created by PhpStorm.
* User: whwyy
* Date: 2018/4/3 0003
* Time: 15:47
*/
declare(strict_types=1);
namespace validator;
class RequiredValidator extends BaseValidator
{
/**
* @return bool
* 检查是否存在
*/
public function trigger(): bool
{
if (!isset($this->params[$this->field])) {
return $this->addError('The param :attribute not exists');
} else {
return true;
}
}
}