API reference > @kontsedal/olas-zod > zodValidator
zodValidator() function
Wrap a Zod schema as an Olas validator. Zod 4 implements Standard Schema v1, so this is now a thin alias over the cross-library validator(...) from @kontsedal/olas-core. Kept under its existing name for back-compat and for code that intentionally signals "this is a Zod schema."
Signature:
typescript
export declare function zodValidator<T>(schema: z.ZodType<T>): Validator<T>;Parameters
Parameter | Type | Description |
|---|---|---|
schema | z.ZodType<T> |
Returns:
Validator<T>