Skip to Content
Prism UI
Reference

@prismrepo/adapter-zod

createZodResolver signature. Full public export list.

Depends on @prismrepo/core, @prismrepo/forms, and @hookform/resolvers; zod (^4.0.0) and react-hook-form (^7.55.0, type-only) as peers. Does not depend on @prismrepo/adapter-rhf. See Zod Adapter for the full usage guide and Zod 4 requirement.

createZodResolver

function createZodResolver<TSchema extends ZodType<unknown, Record<string, unknown>>>(
  schema: TSchema,
): Resolver<SchemaInput<TSchema>, unknown, SchemaOutput<TSchema>>;

Input/output types are inferred from schema itself. Requires Zod 4, a Zod 3 schema does not satisfy TSchema's constraint.

On this page