This is the DTO (excerpt from it):
{
...
@IsArray()
@ArrayMinSize(1)
@ValidateIf((o) => o.type === AddHubElementTypes.AUDIO || o.type === AddHubElementTypes.GENERAL)
@ValidateNested({ each: true })
@Type(() => AudioUrlDto)
@ApiProperty()
@Transform(({ value }) => JSON.parse(value))
audioUrls?: AudioUrlDto[];
...
}
This is the definition of AudioUrlDto:
export class AudioUrlDto {
@IsEnum(HubPageAudioUrlType)
@ApiProperty()
type: HubPageAudioUrlType;
@IsUrl()
@ApiProperty()
url: string;
@IsInt()
@ApiProperty()
order: number;
}
This is what I send:

I receive a 500 error because the audioUrls array was not properly validated.
This is the DTO (excerpt from it):
This is the definition of
AudioUrlDto:This is what I send:

I receive a 500 error because the
audioUrlsarray was not properly validated.