Backend/src/core/pipes/validation.pipe.ts
2022-07-25 10:12:30 +00:00

19 lines
430 B
TypeScript

import { ValidationError, ValidatorOptions } from 'class-validator';
/**
* env variables validation pipeline
*/
export interface ValidationPipeOptions extends ValidatorOptions {
/**
* If it should be transformed
*/
transform?: boolean;
/**
* If error messages should be disabled
*/
disableErrorMessages?: boolean;
/**
* Exception factory
*/
exceptionFactory?: (errors: ValidationError[]) => any;
}