Function: autoValidator()
ts
function autoValidator<T>(schema): FusionValidator<T>;Defined in: packages/core/src/core/StandardSchema.ts:233
Auto-detect and create a FusionValidator from any supported schema.
Detection order:
- Standard Schema v1 (Valibot, ArkType, etc.)
- Zod-like (has
.safeParse()) - Throws if unrecognized
Type Parameters
| Type Parameter | Default type |
|---|---|
T | unknown |
Parameters
| Parameter | Type | Description |
|---|---|---|
schema | unknown | Any supported schema |
Returns
Throws
If the schema type is not recognized