i'm migrating from the standalone version
and 'im wondering how can i achieve this old (custom) behaviour for boolean on zod instance
on my standalone auto-form cnfig.ts
i've set this
/**
* Define handlers for specific Zod types.
* You can expand this object to support more types.
*/
export const DEFAULT_ZOD_HANDLERS: {
[key: string]: keyof typeof INPUT_COMPONENTS;
} = {
ZodBoolean: "switch", // change default here
ZodDate: "date",
ZodEnum: "select",
ZodNativeEnum: "select",
ZodNumber: "number",
};
how can i achieve to this easily with the new version , =)
EDIT:
i tried this but seems to no work
z.object({
name: z.string(),
age: z.coerce.number(),
isHuman: z.boolean().superRefine(
fieldConfig({
fieldType: "switch",
})
)
});
i'm migrating from the standalone version
and 'im wondering how can i achieve this old (custom) behaviour for boolean on zod instance
on my standalone
auto-formcnfig.tsi've set this
how can i achieve to this easily with the new version , =)
EDIT:
i tried this but seems to no work