| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- <?php
- // +----------------------------------------------------------------------
- // | saiadmin [ saiadmin快速开发框架 ]
- // +----------------------------------------------------------------------
- // | Author: your name
- // +----------------------------------------------------------------------
- namespace app\v1\validate\advert;
- use think\Validate;
- /**
- * 广告媒体表验证器
- */
- class MediaListValidate extends Validate
- {
- /**
- * 定义验证规则
- */
- protected $rule = [
- 'name' => 'require',
- 'channel_name' => 'require',
- 'andurl' => 'require',
- 'iosurl' => 'require',
- 'xyxurl' => 'require',
- 'appleturl' => 'require',
- 'state' => 'require',
- ];
- /**
- * 定义错误信息
- */
- protected $message = [
- 'name' => '媒体名称必须填写',
- 'channel_name' => '媒体渠道简称必须填写',
- 'andurl' => '安卓监测链接必须填写',
- 'iosurl' => 'ios监测链接必须填写',
- 'xyxurl' => '小游戏监测链接必须填写',
- 'appleturl' => '小游戏路径参数补充必须填写',
- 'state' => '状态必须填写',
- ];
- /**
- * 定义场景
- */
- protected $scene = [
- 'save' => [
- 'name',
- 'channel_name',
- 'andurl',
- 'iosurl',
- 'xyxurl',
- 'appleturl',
- 'state',
- ],
- 'update' => [
- 'name',
- 'channel_name',
- 'andurl',
- 'iosurl',
- 'xyxurl',
- 'appleturl',
- 'state',
- ],
- ];
- }
|