ErlangFormDocs v1.0.0
Reference

Schema support

Zod inference rules and renderer limits in Erlangform 1.0.0.

Form values

[
  {
    "name": "name",
    "type": "string"
  },
  {
    "name": "active",
    "type": "boolean"
  },
  {
    "name": "email",
    "type": "email"
  }
]

The root must be z.object(). This table describes child inference; connect validation separately to TanStack Form.

Child schemaMetadata and rendering
z.string()string; text input
z.email(), z.url()email/url; specialized input
z.number()number; clearing stores undefined
z.boolean()boolean; checkbox
String enumstring with options; select
Numeric enumnumber; no automatic select
String literalstring with one option
Number/boolean literalnumber/boolean
z.iso.date(), z.iso.time()date/time; strings
z.iso.datetime()datetime; UTC string
z.date()date-object; local Date
z.file()file; first File
z.object()object; recursive children
z.array()array; add/remove/duplicate/reorder
z.tuple()tuple; fixed positions
z.record()record; existing keys
z.discriminatedUnion()union; branch selected by discriminator
Union with the same inferred metadata typeFirst type's renderer; string options combined
Mixed unionunknown; no built-in input
Intersection of objectsCombined child lists without deduplication
Intersection of the same typeLeft-hand metadata
Mixed intersectionunknown

Wrappers and pipelines

optional, nullable, default, catch, readonly, nonoptional, and prefault are unwrapped for type inference. lazy is resolved, and pipe is read from its input side. This only infers fields: it does not populate defaults, lock readonly fields, remove null, or write transformed values into state.

Specialized Zod 4 constructors such as z.email() are recognized. Checks attached to older string schemas do not necessarily change the inferred input type.

No built-in renderer

Unlisted types such as map/set/bigint/symbol/unknown/any fall back to unknown, which has no default control. Supply an unknown registry component. Inspect metadata for multi-value literals and complex unions before assuming they have a suitable editor.

A lazy schema that refers back to itself has no inference depth/cycle guard. Avoid unbounded recursion. Tuple rest positions do not create dynamic fields. Prefer one string-literal discriminator per branch.

Zod min/max rules do not automatically become HTML attributes or array-control limits. Set the corresponding fieldConfig/array options and keep schema validation for data correctness.

On this page