Skip to content

[Feature Request] Validate only updated fields #2025

@baenio

Description

@baenio

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions