Repository navigation
Tags
Tags
fix: error-map issues, factory error params, ZodType input, vV2.enum …
…(3.4.1)
- Message functions passed to checks receive a Zod-style issue (code,
minimum/maximum, inclusive, format, ..., input) per failure instead of
undefined; a throwing function keeps the default message, so safeParse
never throws because of it. V1/V2 number + string, string formats,
v.custom, V2 date/bigint/array checks.
- v.string/number/boolean/bigint/date (and mini) accept Zod factory params
("msg" | { error } | { message }) for their invalid_type issue.
- v.ZodType / z.ZodType / ZodSchema / Schema default Input to unknown, so
v.lazy() schemas can be annotated as v.ZodType<T>.
- vV2.enum("a", "b") supported and typed; string().ip({ version }) honours
the version (V1 + V2).
- v.setV2Mode / v.useV2 deprecated (never swapped factories).
- Docs: default messages are a known difference from Zod (not verbatim);
validate/memory/bundle figures match the 2026-12-01 website measurements;
setV2Mode examples replaced with vV2. Website: 3.4.1 strings, fixed
known-limitation notes.
- verify:bundle mini budget 83,000 -> 84,000 bytes (83,036 measured).
PreviousNext