We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Would be great to have support for zod-definitions on model level.
example:
/// @zod.refine((val) => val.type === 'PRIVATE' || val.company !== null, { path: 'company', message: 'Required if type is company' }) model Address { id String @id @unique @default(uuid()) type AddressType company String? /// @zod.min(1).max(50) address String /// @zod.min(1).max(50) zipCode String /// @zod.min(1).max(10) city String /// @zod.min(1).max(50) } enum AddressType { PRIVATE COMPANY }
The text was updated successfully, but these errors were encountered:
Add schema-level modifiers (fix #133)
9905cbf
No branches or pull requests
Would be great to have support for zod-definitions on model level.
example:
The text was updated successfully, but these errors were encountered: