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

@param ValidatorContract $validator
@param \Closure|null $closure
@return JsonApiException
Create a JSON API exception for a failed validator .