You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What is an issue? Please explain with some screenshots.
The parameters using @Query decorator have the type as String in default. We tried to transform the parameters as Number, such like skip or take. However, there is transform: true in CustomValidationPipe, no transform was applied.
After debugging, we found CustomValidationPipe returns the original value after plainToClass and validate processes. The plainToClass makes the original value to be transformed, so the transformed values(parameters) must be returned as transform result.
The code image shows a result that should have changed. In previous, value is returned instead of transformed (object).
✨ Expected Results
What result do you expect?
To use @Transform decorator in DTO, CustomValidationPipe should be changed to return the transformed object. For the moment, transform returns the original value.
The text was updated successfully, but these errors were encountered:
📸 What is this issue?
The parameters using
@Query
decorator have the type asString
in default. We tried to transform the parameters asNumber
, such likeskip
ortake
. However, there istransform: true
inCustomValidationPipe
, no transform was applied.After debugging, we found
CustomValidationPipe
returns the originalvalue
afterplainToClass
andvalidate
processes. TheplainToClass
makes the original value to be transformed, so the transformed values(parameters) must be returned astransform
result.✨ Expected Results
To use
@Transform
decorator in DTO,CustomValidationPipe
should be changed to return the transformed object. For the moment,transform
returns the original value.The text was updated successfully, but these errors were encountered: