#ValidationPipe + class-validator Can it be used in pure js development? How to use it?

2 messages · Page 1 of 1 (latest)

surreal tangle
#

I want to call it automatically instead of manually using validate(XXX)

winged kiln
#

Not really. Nest's ValidationPipe makes use of Typescript emit metadata that comes from the use of decorators and tsc. If you aren't using Typescript, you'd have to find a babel equivalent, and without that type metadata, I'm not sure you'll really be able to