feat: 添加基类校验规则

This commit is contained in:
2025-03-13 10:49:35 +08:00
parent 6b9af63f8b
commit bab6116e9f

View File

@@ -0,0 +1,15 @@
<?php
declare (strict_types = 1);
namespace app\admin\validate\v1;
use think\Validate;
class BaseValidate extends Validate
{
// 验证某个字段提交是否忽略某个字段
protected function mustOmit($value, $rule, $data, $field)
{
return !isset($data[$field]);
}
}