You have to enable transform in ValidationPipe
async function bootstrap() {
const app = await NestFactory.create(ServerModule);
app.useGlobalPipes(new ValidationPipe({ transform: true })); // enable transform
await app.listen(config.PORT);
}
bootstrap();