Closed albertodiazdorado closed 3 years ago
Search for class-validator solution like each: true
or @ValidateNested
@MichalLytek that was the solution, thank you very much!
I fixed the example by adding the decorators
@IsInstance(Album, {each: true})
@ValidateNested()
to the albums
field. Works like a charm.
PS: And thank you very much for the quick answer!! :D
I can validate nested objects, and I can make sure that certain property is an array. However, the validator does not care if the elements in the array are valid or not. What am I forgetting here?
I have written a complete reproducer and pushed it here: https://gitlab.com/albertodiazdorado/class-transform-validator-issue To reproduce: