API reference > @kontsedal/olas-zod > ExtraValidators
ExtraValidators type
Per-leaf extra validators keyed by dotted path. Match the leaf field's position inside the schema:
- top-level:
'title'- nested form:'address.street'
A path names a position in the SCHEMA, not in the value, and an array contributes no segment to it. So a path at or under an array applies to every element:
z.array(z.string())undertags→'tags'validates each tag -z.array(z.object({ name }))undertags→'tags.name'validates each item'snamefield
There is no path that addresses the FieldArray itself. Put an array-level rule, such as "at least three tags" or "no duplicates", in the Zod schema instead: z.array(...).min(3) or z.array(...).refine(fn).createZodForm enforces it, and its message lands in the array'stopLevelErrors.
Validators run alongside zodValidator(schema) — both must pass.
Signature:
typescript
export type ExtraValidators = Record<string, Validator<any>>;References: Validator