Optionalcfg: { default?: string; maxLength?: number; required?: boolean }A text field. The INPUT stays lenient regardless of the output — that's the
dual-schema contract that lets a field HOLD a half-typed invalid value
(rejected only at submit) instead of snapping to the default while typing.
output overrides the strict contract (formats, messages) without giving
that up:
textOf({ output: z.string().email('A valid email is required') })
A text field. The INPUT stays lenient regardless of the output — that's the dual-schema contract that lets a field HOLD a half-typed invalid value (rejected only at submit) instead of snapping to the default while typing.
outputoverrides the strict contract (formats, messages) without giving that up:textOf({ output: z.string().email('A valid email is required') })