// +---------------------------------------------------------------------- namespace app\validate\admin; use think\Validate; class PartnerRoleValidate extends Validate { protected $failException = true; protected $rule = [ 'name|角色名称' => 'require|max:20', 'ratio|比例' => 'require', 'status|启用状态' => 'require|in:1,2', 'type|角色类型' => 'require|in:1,2,3,4', 'max_role_num|配置人数' => 'require|min:1' ]; }