Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Validate only updated fields #2025

Open
baenio opened this issue Mar 3, 2025 · 0 comments
Open

[Feature Request] Validate only updated fields #2025

baenio opened this issue Mar 3, 2025 · 0 comments

Comments

@baenio
Copy link

baenio commented Mar 3, 2025

Is your feature request related to a problem? Please describe.
When adding or updating an existing validation, for example the password field in the user model, the user cannot update the termsAndConditions, unless the password is also updated. This is because all fields are being validated, even the one that are not updated.

Describe the solution you'd like
A solution could be, to have a switch to either validate updated fields only or all fields (like it is now).

Another options could be, to only have validate on updated fields only, this way the developer itself can choose, if another field should be validated, by simply passing the unchanged value to the update.

Describe alternatives you've considered
An alternative is to build an API, to use Prisma itself and skip the validation entirely. Which isn't very clean

Additional context
Discord Thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant