code: public function setValidationRules($validationRules)
      {
          if (! is_callable($validationRules) && ! is_array($validationRules) && $validationRules !== null) {
              throw new InvariantViolation(
                  'Server config expects array of validation rules or callable returning such array, but got ' .
                  Utils::printSafe($validationRules)
              );
          }
  
          $this->validationRules = $validationRules;
  
          return $this;
      }
docs: Set validation rules for this server.
  
  @param ValidationRule[]|callable $validationRules
  
  @return self
  
  @api