Open
Description
Is there an existing issue that is already proposing this?
- I have searched the existing issues
Is your feature request related to a problem? Please describe it
There are numerous schema validators out there. This has spawned an ecosystem around NestJS with various integrations such as nestjs-valibot and many others.
Describe the solution you'd like
NestJS could support stanadard-schema which recently hit 1.0.0:
Standard Schema is a common interface designed to be implemented by JavaScript and TypeScript schema libraries.
With that a commonly shared ValidationPipe
could be offered directly from the framework instead of copy/pasting the integrations from the docs site.
Teachability, documentation, adoption, migration strategy
Guide on how to accept Standard Schema: https://standardschema.dev/#how-do-i-accept-standard-schemas-in-my-library
- Offer a general
ValidationPipe
that is compatible with standard-schema - Update the docs how the
ValidationPipe
can be utilised with different schema libraries
What is the motivation / use case for changing the behavior?
I think it makes NestJS more future-proof with any future schema/validation library that might come