class-validator icon indicating copy to clipboard operation
class-validator copied to clipboard

question: I have no types for ValidatorJS

Open bacloud22 opened this issue 2 years ago • 0 comments

I had been struggling as VSCode would not show errors across the project. As you can see I always use groups, and because all ValidatorJS options are not properly typed, I didn't figure out I'm passing in many occasions the ValidationOptions instead, so neither the groups would work, neither the validation itself.

image

image

For instance I was having such a erroneous annotation: @IsDateString({ groups: ['validate', 'create', 'update'] })

Thanks a lot ^^

bacloud22 avatar Jul 11 '23 09:07 bacloud22