-
-
Notifications
You must be signed in to change notification settings - Fork 8k
Closed
Description
I'm submitting a...
[ ] Regression
[ ] Bug report
[ ] Feature request
[x] Documentation issue or request
[ ] Support request => Please do not submit support request here, instead post your question on Stack Overflow.
Current behavior
The doc says at https://docs.nestjs.com/custom-decorators#working-with-pipes that custom validators may be used with pipes. The example shows the ValidationPipe
. But the the ValidationPipe
skips on metadata.type == 'custom'
https://github.com/nestjs/nest/blob/master/packages/common/pipes/validation.pipe.ts#L78
Expected behavior
Either the docs should be updated or the validation pipe allowed to run on custom decorators.
Personally i would prefer the latter.
What is the motivation / use case for changing the behavior?
It would be useful to use the validation pipe for custom types instead of duplicating the code.
Metadata
Metadata
Assignees
Labels
No labels