Closed olivier-deschenes closed 1 year ago
Added the missing zod schema in the error thrown when a type is missing in the form mapping.
Exemple
const mapping = [[z.string(), () => <input />] as const] as const; const Schema = z.object({ enum: z.enum(["Yes"]), }); const Form = createTsForm(mapping); render ( <Form schema={Schema} /> )
With the current error, this will throw
No matching zod schema found in mapping for property enum. (...)
With the changes, this will now throw:
No matching zod schema for type ZodEnum found in mapping for property enum. (...)
ZodEnum
enum
My bad. @iway1 done 😁.
🙏
Added the missing zod schema in the error thrown when a type is missing in the form mapping.
Exemple
With the current error, this will throw
With the changes, this will now throw: