How to apply both ValidationPipe() and ParseIntPipe() to params?
If you apply the ParseIntPipe to the id param, it will only transform id but not the property id of params, here it will stay a string. Instead, you can use class-transformer to transform your param to a number: import { Transform } from ‘class-transformer’; export class CreateDataParams { @Transform(id => parseInt(id), {toClassOnly: true}) id: … Read more