Zod
Officialv5.13.3@kubb/plugin-zod
kubb add plugin-zod
How-to guides
5 guides
Coerce input with Zod
Set coercion to convert form data and query strings with z.coerce before Zod validates them, and see which format checks each key turns off.
Compile Zod schemas
Set compile to wrap generated schemas in z.compile(...) for faster validation, and see which schemas stay on the interpreter. Needs Zod 4.5 or later.
Customize generated schemas
Prefix inferred types, change Zod validators, and encode custom request types.
