The first-party zod package/plugin for FormKit. Read the documentation for usage instructions.
Creates a new Zod schema plugin for form validation.
createZodPlugin<Z extends z.ZodTypeAny>(zodSchema: Z, submitCallback: (payload: z.infer<typeof zodSchema>, node: FormKitNode | undefined) => void | Promise<void>): [FormKitPlugin, (payload: any, node: FormKitNode | undefined) => void];
zodSchema
— A Zod schema to validate the form against.submitCallback
— A callback to run when the form is submitted and it passes validation.A tuple of a FormKitPlugin and a submit handler.