Validation
TIP
This feature is inspired by NestJS controllers
DTO Validation is implemented by the @Body decorator, the decorator will handle validations set by class-validator package.
typescript
import { IsString, IsInt } from 'class-validator';
export class CreateCatDto {
@IsString()
name: string;
@IsInt()
age: number;
@IsString()
breed: string;
}