Put in order · NestJS course · Module 10: Data Validation
Validation Hierarchy in NestJS
Arrange the validation layers from the lowest to the highest level:
Items to put in order
- Global pipe (app.useGlobalPipes)
- Controller (where the DTO is used with @Body)
- Decorators on DTO fields (@IsString, @IsNumber)
- ValidationPipe (automatic validation execution)
You can check the correct answer by solving this task in the CodeWorlds game.