#Validation not working in case I have array of DTO

2 messages · Page 1 of 1 (latest)

oak topaz
#

I am using a dto to validate array of product.
The controller function goes as follow:
async create(@Body() productDTO:ProductDTO[]){}
all other functions are validating well. except this. Please help.

fringe pebble
#

Maybe this section of the doc might be usefull : https://docs.nestjs.com/techniques/validation#parsing-and-validating-arrays