Click in order · NestJS course · Module 2: Routing and Request Lifecycle

Introduction: DTO Definition with Validation

Arrange the elements of a DTO field definition with validation in the correct order:

Items to click

  • name: string;
  • }
  • export class CreateTributeDto {
  • @IsString()
Show the answer

Correct order:

  1. export class CreateTributeDto {
  2. @IsString()
  3. name: string;
  4. }