@ValidateNested() tells class-validator to run validation recursively on a nested object. You must pair it with @Type() from class-transformer because incoming JSON is a plain object — without @Type(), class-validator has no typed class instance to validate against and silently skips the nested rules.
@ValidateNested() alone is not enough — the nested value must be a class instance.
@Type(() => NestedDto) instructs class-transformer to instantiate the correct class.
For arrays of nested objects use @ValidateNested({ each: true }) + @Type(() => ItemDto).
transform: true must be enabled in ValidationPipe for @Type() to take effect.
Missing @Type() is the most common cause of silent nested validation bypass.