123456789101112131415161718192021222324252627 |
- <?php
- namespace app\admin\validate\sys_manage;
- use think\Validate;
- class CategoryValidate extends Validate
- {
- protected $rule = [
- 'category_name' => 'require|chsDash',
- 'category_super_id' => 'integer',
- 'category_status' => 'require|in:PENDING,ACTIVED,DISABLED',
- 'category_classify' => 'chsDash',
- 'category_type' => 'chsDash',
- 'category_sort' => 'integer',
- 'category_groupby' => 'chsDash',
- 'category_remark' => 'chsDash'
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['category_name', 'category_super_id', 'category_status', 'category_classify', 'category_type', 'category_sort', 'category_groupby', 'category_remark'],
- 'update' => ['category_name', 'category_super_id', 'category_classify', 'category_type', 'category_sort', 'category_groupby', 'category_remark'],
- 'update_status' => ['category_status']
- ];
- }
|