| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\validate\center;
- use think\Validate;
- /**
- * 权限开关验证器
- */
- class QxSwitchValidate extends Validate
- {
- /**
- * 定义验证规则
- */
- protected $rule = [
- 'package_name' => 'require',
- 'qx' => 'require',
- 'ystc' => 'require',
- 'init' => 'require',
- ];
- /**
- * 定义错误信息
- */
- protected $message = [
- 'package_name' => '包名必须填写',
- 'qx' => '咨询允许获得必须填写',
- 'ystc' => '隐私弹窗必须填写',
- 'init' => '登录框同意勾选文案必须填写',
- ];
- /**
- * 定义场景
- */
- protected $scene = [
- 'save' => [
- 'package_name',
- 'qx',
- 'ystc',
- 'init',
- ],
- 'update' => [
- 'package_name',
- 'qx',
- 'ystc',
- 'init',
- ],
- ];
- }
|