I'm wonder what a difference between
transform: true
And
transformOptions: {
enableImplicitConversion: true,
}
From documentation I don't quite understand which I must to use for what cases.
https://docs.nestjs.com/techniques/validation https://github.com/typestack/class-transformer
transform means that the ValidationPipe will return the new class instance at the end of the pipe call. This has no effect on the validations ran, as plainToClass will be called regardless so that validate can run against the class.
enableImplicitConversion will tell class-transformer that if it sees a primitive that is currently a string (like a boolean or a number) to assume it should be the primitive type instead and transform it, even though @Type(() => Number) or @Type(() => Boolean) isn't used.