-
-
Notifications
You must be signed in to change notification settings - Fork 126
Closed
Labels
Milestone
Description
Description and expected behavior
After following the instructions in the Form Validation blog post, I attempted to use the generated zod models. They seemed to be working correctly at first, but then I encountered a runtime error.
Screenshots
If applicable, add screenshots to help explain your problem.
(alias) const ClientCreateSchema: z.ZodObject<{
id: z.ZodOptional<z.ZodString>;
createdAt: z.ZodOptional<z.ZodDate>;
updatedAt: z.ZodOptional<z.ZodDate>;
email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
firstName: z.ZodString;
lastName: z.ZodString;
}, "strip", z.ZodTypeAny, {
firstName: string;
lastName: string;
id?: string | undefined;
createdAt?: Date | undefined;
updatedAt?: Date | undefined;
email?: string | null | undefined;
phone?: string | null | undefined;
}, {
firstName: string;
lastName: string;
... 4 more ...;
phone?: string | null | undefined;
}>
Unhandled Runtime Error
TypeError: Cannot read properties of undefined (reading 'ClientCreateSchema')
Environment:
- ZenStack version: 1.1.1
- Prisma version: 5.1.1
- Database type: sqlite
Additional context
I have searched everywhere but couldn't find a similar issue. would greatly appreciate any help or direction in debugging it. 🙏🏽
