Graphorin API reference v0.1.0
Graphorin API reference / @graphorin/core / / validate
Function: validate()
ts
function validate<T>(schema, data): ValidationResult<T>;Defined in: packages/core/src/utils/validation.ts:51
Synchronous validation wrapper. Does not swallow errors thrown by the schema's transformations — only normalizes the success / failure signal.
Type Parameters
| Type Parameter |
|---|
T |
Parameters
| Parameter | Type |
|---|---|
schema | ZodLikeSchema<T> |
data | unknown |
Returns
ValidationResult<T>