UNPKG

@khoativi/nestjs-class-validator-i18n

Version:

NestJS integration for class-validator with i18n support using Accept-Language headers and customizable locale files.

13 lines (12 loc) 521 B
import { ArgumentsHost, ExceptionFilter } from '@nestjs/common'; import { HttpAdapterHost } from '@nestjs/core'; import { I18nValidationException } from './i18n-validation.exception'; export declare class I18nValidationFilter implements ExceptionFilter { private readonly adapterHost; private readonly i18n; private readonly fallback; constructor(adapterHost: HttpAdapterHost, opts?: { fallbackLanguage?: string; }); catch(exception: I18nValidationException, host: ArgumentsHost): void; }