'in:4,6', 'status|状态' => 'require|integer', 'team_name|团队昵称' => 'max:20', 'team_uid|团队长' => 'require|integer', 'is_remove|是否移除团队' => 'require' ]; protected $message = [ 'custom_code.in' => '万能验证码错误', 'status.require' => '请选择状态', 'status.integer' => '请选择状态', 'team_uid.require' => '请输入团队长uid', 'team_uid.integer' => '请输入团队长uid', 'is_remove.in' => '请选择是否移除团队' ]; /** * 验证添加零用户请求 * 使用父类通用验证方法进行数据验证 * * @return array */ public function validate(): array { $data = $this->request->param(); if (!$this->check($data)) { return [ 'status' => 'error', 'message' => $this->getError() ]; } return [ 'status' => 'success', 'data' => ZeroUserRequestEntity::newInstance($data) ]; } }