samchon / nestia-helper

NestJS helper with Type level
MIT License
34 stars 3 forks source link

TypedBody is not working with class-validator #36

Open ilterugur opened 2 years ago

ilterugur commented 2 years ago

Class validator is not validating parameters decorated with nestia-helper's TypedBody decorator

samchon commented 2 years ago

It is designed to inspect type through typescript-json validator. If you wanna use class validator, TypedBody is not a good solution.

https://github.com/samchon/typescript-json#runtime-type-checkers

However, if you wanna keep using this TypedBody for the typescript type inspection and only need additional inspection, you can use comment tags instead.

https://github.com/samchon/typescript-json#comment-tags