code: public function failedValidatorException(
          ValidatorContract $validator,
          \Closure $closure = null
      ): JsonApiException
      {
          return new ValidationException(
              $this->failedValidator($validator, $closure)
          );
      }
docs: Create a JSON API exception for a failed validator.
  
  @param ValidatorContract $validator
  @param \Closure|null $closure
  @return JsonApiException