123456789101112131415161718192021222324 |
- <?php
- namespace app\admin\validate\sys_manage;
- use support\Validate;
- class RoleValidate extends Validate
- {
- protected $rule = [
- 'role_id' => 'require',
- 'role_status|状态' => 'require|in:ACTIVED,DISABLED',
- 'role_category|分类' => 'require|in:NORMAL,OTHER',
- 'role_name|名称' => 'max:255'
- ];
- protected $message = [];
- protected $scene = [
- 'add' => ['role_status', 'role_category', 'role_name'],
- 'update' => ['role_status', 'role_category', 'role_name'],
- 'update_status' => ['role_status'],
- 'permission' => ['role_id']
- ];
- }
|