I'm utilizing Class-Validator for validating DTO properties in my Nest.js application. One of the properties is "images", which is an array of strings representing URLs. I need to validate each URL in this array.
class SomeDto {
// ...
// Array of URLs
@IsArray()
@IsUrl({each:true})
images: string[];
// ...
}
However, the validation doesn't seem to be working as expected. Can anyone provide guidance on how to properly validate this array of URLs?