Skip to content

basalt / ai/src / zodForField

Function: zodForField() ​

> zodForField(field, create): string

Defined in: ai/src/make/fields.ts:83

Zod validator for a field, honoring an enum (z.enum([...])) over its base type.

Parameters ​

field ​

PlanField

create ​

boolean

Returns ​

string

Released under the MIT License.