AF01

The schema you passed comes from a different Zod major than the adapter you imported.

In development this reads:

attaform/zod-v4 Schema is not a Zod v4 schema. The attaform/zod-v4 adapter requires zod@^4. Either: (a) install zod@^4 in your project; (b) import from attaform/zod, which auto-detects the Zod version (and tree-shakes to a single adapter when the attaform/vite plugin is active); or (c) import from attaform/zod-v3 if you are staying on Zod v3.

The mirror case fires from attaform/zod-v3 when it receives a Zod v4 schema.

What happened

Attaform ships a first-class adapter for each Zod major, and each adapter reads that major's internal schema shape. A z.object(...) built by zod@4 has no meaning to the v3 adapter, and vice versa, so the adapter stops at construction instead of failing somewhere deep in validation.

How to fix it

  • Import from attaform/zod. It detects the installed Zod major and routes to the matching adapter, and the attaform/vite plugin tree-shakes the unused one.
  • Or align the explicit entry with your install: attaform/zod-v4 with zod@^4, attaform/zod-v3 with zod@^3.
  • Monorepos: check for two Zod copies. A schema built by one workspace package against zod@3 and validated by another against zod@4 triggers this even though both imports look identical.

Entry points walks the full entry map.