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
Add an option to make local pipes override global ones.
Is your feature request related to a problem? Please describe.
Not really a problem but it's due to a global ValidationPipe taking precedence over a local one.
Describe the solution you'd like
I would like to use a global validation pipe and be able to override it at module/controller/method level in order to specify different options when needed.
What is the motivation / use case for changing the behavior?
I have a project in which I've the ValidationPipe globally in main.ts:
The method that creates social media for a member would validate with group 'member' and the method that creates social media for the company would validate with group 'company'.
I would like to use the global validation pipe (in order to validate the majority of classes that do not use different groups) and be able to override it at module/controller/method level in order to specify a group when needed.
Feature Request
Add an option to make local pipes override global ones.
Is your feature request related to a problem? Please describe.
Not really a problem but it's due to a global ValidationPipe taking precedence over a local one.
Describe the solution you'd like
I would like to use a global validation pipe and be able to override it at module/controller/method level in order to specify different options when needed.
What is the motivation / use case for changing the behavior?
I have a project in which I've the ValidationPipe globally in main.ts:
But I have some classes with different validations depending on the group used, like so:
The method that creates social media for a member would validate with group 'member' and the method that creates social media for the company would validate with group 'company'.
I would like to use the global validation pipe (in order to validate the majority of classes that do not use different groups) and be able to override it at module/controller/method level in order to specify a group when needed.
Another use case is the one described in #2390.
The text was updated successfully, but these errors were encountered: