ValidationSchema
katanakit-js / ValidationSchema
Interface: ValidationSchema<T>
Section titled “Interface: ValidationSchema<T>”Defined in: types/core/validation.ts:20
Schema-agnostic contract. Accepts Zod (safeParse), Valibot
(safeParse), Standard Schema (~standard.validate), Yup
(validateSync) or any object exposing one of those members.
Type Parameters
Section titled “Type Parameters”| Type Parameter | Default type |
|---|---|
T |
unknown |
Properties
Section titled “Properties”| Property | Type | Defined in |
|---|---|---|
~standard? |
{ validate: (data) => | { issues?: { message: string; path: (string | number)[]; }[]; } | Promise<{ issues?: { message: string; path: (… | …)[]; }[]; }>; } |
types/core/validation.ts:22 |
~standard.validate |
(data) => | { issues?: { message: string; path: (string | number)[]; }[]; } | Promise<{ issues?: { message: string; path: (… | …)[]; }[]; }> |
types/core/validation.ts:23 |
safeParse? |
(data) => ValidationParseResult<T> |
types/core/validation.ts:21 |
validate? |
(data) => unknown |
types/core/validation.ts:28 |
validateSync? |
(data) => unknown |
types/core/validation.ts:27 |