Skip to main content

Function: processLazy()

processLazy(schema, ctx, field, params): void

Defined in: packages/core/src/processors/wrappers.ts:176

Process z.lazy() — evaluates the lazy getter and delegates to the inner schema's processor. Guards against infinite recursion using ctx.currentDepth / ctx.maxDepth and the seen WeakSet. Renders as a plain text Input when the depth limit is reached or the schema is cyclic.

Parameters

schema

$ZodLazy

The $ZodLazy schema whose getter is evaluated on first encounter.

ctx

FormProcessorContext

The walker context providing depth tracking, cycle detection, and processor dispatch.

field

FormField

The base FormField to mutate in-place.

params

ProcessParams

Parent path metadata passed through to the inner processor.

Returns

void