DEV Community

Discussion on: Validating nested objects with class-validator in NestJS

Collapse
 
daygarcia profile image
Dayanne Garcia

Great article, thanks. But I'm struggling with something that looks simple, but I can't find nothing about this on internet

If i have a request like this:

[{
"name", "Azuki",
"age": 17
},
{
"name": "Luke"
"age": 18
}]

How can I validate?

Collapse
 
avantar profile image
Krzysztof Szala

But what do you want to validate exactly? That every object in array has valid structure?