Skip to content

[Feature Request] Allow for Prisma enums in validation rules #1211

Description

@nwidynski

Is your feature request related to a problem? Please describe.
While Zenstack is already offering great validation capabilities, it would be nice if it were possible to use Prisma enums
inside a validate block, for example with an in operation. This would allow for an always-in-sync validation instead of relying on manual updates in both codebase and validation rules.

One might ask why not set the field as the enum? The answer to that being that working with primitives is easier to migrate and also better supported across third party vendors, like Hasura GraphQL.

Describe the solution you'd like
Allow for Prisma enums to be referenced in validations rules, especially with the in operator.

Describe alternatives you've considered

Additional context

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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