// +---------------------------------------------------------------------- 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', ]; }