Function: passesSchema()
ts
function passesSchema(schema: Schema, value: unknown): boolean;Defined in: src/lib/utils/validation.ts:16
Returns true if value satisfies schema without throwing.
Parameters
| Parameter | Type | Description |
|---|---|---|
schema | Schema | The schema to validate against. |
value | unknown | The value to test. |
Returns
boolean
true when value passes the schema; false otherwise.
Remarks
Aborts on the first validation error. Use validateOrThrow or asyncValidateOrThrow when you need the full set of field errors.