UNPKG

@puq/middleware

Version:

Interceptors, middlewares, and pipes

19 lines (18 loc) 544 B
import { UnprocessableEntityException as o, ValidationPipe as t } from '@nestjs/common'; export function globalValidationPipeOptions(t) { return { expectedType: null == t ? void 0 : t(), transform: !0, validationError: { target: !0, value: !0 }, exceptionFactory (t) { throw new o({ errors: t }); } }; } export const GlobalValidationPipe = new t(globalValidationPipeOptions()); //# sourceMappingURL=global-validation.js.map