code: protected function queryValidator()
      {
          return $this->validatorFactory()->queryParameters(
              $this->queryRules(),
              $this->queryMessages(),
              $this->queryCustomAttributes(),
              function (Validator $validator) {
                  return $this->conditionalQuery($validator);
              }
          );
      }
docs: Get a validator for all query parameters.
  
  @return QueryValidatorInterface