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
For example, a schema like this:
model Test { id Int @id @default(autoincrement()) /// @zod.custom(z.nativeEnum(imports.State)) state Int @default(0) }
Where State is defined in imports like:
State
imports
export enum State { ONE, TWO, THREE }
Generates:
export const TestModel = z.object({ id: z.number().int(), state: z.nativeEnum(imports.State).int() })
Which is invalid because nativeEnum is number and don't have .int(). I can replace with a custom refine, but this is not the question...
nativeEnum
.int()
refine
The text was updated successfully, but these errors were encountered:
No branches or pull requests
For example, a schema like this:
Where
State
is defined inimports
like:Generates:
Which is invalid because
nativeEnum
is number and don't have.int()
.I can replace with a custom
refine
, but this is not the question...The text was updated successfully, but these errors were encountered: