I can't add the @IsNotEmpty() validator in nestjs Dtos
Asked
Active
Viewed 196 times
0
-
1Your dto need to be a class to use it – Cuong Le Ngoc Jun 23 '22 at 06:16
1 Answers
1
Decorators in Typescript can only apply to classes, class members, class methods, and class method parameters. This is an interface, so it's not a valid location for a decorator.

Jay McDoniel
- 57,339
- 7
- 135
- 147