UNPKG

@rafikidota/eidolon

Version:

Sometimes, the best way to solve your own problems is to help someone else.

19 lines 666 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.GenericValidationPipe = void 0; const common_1 = require("@nestjs/common"); const exceptions_1 = require("../exceptions"); const GenericValidationPipe = (DTO) => { return new common_1.ValidationPipe({ expectedType: DTO, transform: true, whitelist: true, forbidNonWhitelisted: true, forbidUnknownValues: true, exceptionFactory: (errors) => { return new exceptions_1.BadRequestRpcException(errors); }, }); }; exports.GenericValidationPipe = GenericValidationPipe; //# sourceMappingURL=validation.pipe.js.map