12345678910111213141516171819202122232425262728293031 |
- <?php
- namespace app\validate\admin;
- use think\Validate;
- class SystemNoticeValidate extends Validate
- {
- protected $failException = true;
- protected $rule = [
- 'type|商户类型' => 'require|in:1,2,3,4',
- 'mer_id|商户' => 'requireIf:type,1|array',
- 'is_trader|自营类型' => 'requireIf:type,2|in:0,1',
- 'category_id|商户分类' => 'requireIf:type,3|array',
- 'notice_title|公告标题' => 'require|max:100',
- 'notice_content|公告内容' => 'require|max:800',
- ];
- }
|