Function: processString()
processString(
schema,ctx,field,_params):void
Defined in: packages/core/src/processors/string.ts:39
Process z.string() — renders as an Input with appropriate type for all formats.
String date/time formats (date, time, datetime) map to native HTML inputs
(type="date", type="time", type="datetime-local"), keeping register-compatible
string values. Only z.date() (Date-object schema) routes to DatePicker.
Extracts format, minLength, maxLength, and pattern constraints from the constraint bag.
Converts regex patterns to input masks via regexToMask when possible.
Parameters
schema
$ZodString
The $ZodString schema to process.
ctx
The walker context providing the form registry for component overrides.
field
The base FormField to mutate in-place.
_params
Unused; included for processor signature conformance.
Returns
void
Remarks
Format-to-input-type mapping: email → type="email", url → type="url",
date → type="date", time → type="time", datetime → type="datetime-local".
All string formats stay on Input; DatePicker is reserved for z.date() only.
Pattern is extracted from bag.patterns (a Set<RegExp>); only the first pattern is used.