Click in order · NestJS course · Module 10: Data Validation
Building a Nested DTO
Arrange the decorators for the soldiers field in CreateLegioDto in the correct order:
Items to click
- @ValidateNested({ each: true })
- @Type(() => SoldierDto)
- soldiers: SoldierDto[];
- @IsArray()
You can check the correct answer by solving this task in the CodeWorlds game.