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-v4adapter requires zod@^4. Either: (a) install zod@^4 in your project; (b) import fromattaform/zod, which auto-detects the Zod version (and tree-shakes to a single adapter when theattaform/viteplugin is active); or (c) import fromattaform/zod-v3if 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 theattaform/viteplugin tree-shakes the unused one. - Or align the explicit entry with your install:
attaform/zod-v4withzod@^4,attaform/zod-v3withzod@^3. - Monorepos: check for two Zod copies. A schema built by one workspace package against
zod@3and validated by another againstzod@4triggers this even though both imports look identical.
Entry points walks the full entry map.