TanStackOSS
    form
    fix(form-core): check StandardSchemaV1 before FieldValidateFn in UnwrapFieldValidateOrFn Arktype's `Type` implements `Callable<fn>` which makes it structurally extend `(data: unknown) => T`. TypeScript's contravariant parameter check means `ArkType extends FieldValidateFn<any,any,any>` evaluates to `true` (the param check reduces to `{value:any,...} extends unknown`), so the `StandardSchemaV1` branch was never reached and `errors` entries resolved to `ReturnType<ArkType>` instead of `StandardSchemaV1Issue[]`. Fix: check `StandardSchemaV1` first on both the field and form-group branches of `UnwrapFieldValidateOrFn`. Schemas that happen to be callable (arktype, and future StandardSchema implementations) now take the correct path; plain function validators still fall through to the `FieldValidateFn` branch as before. Adds a type-level test asserting that an arktype `type('string>0')` field validator produces `StandardSchemaV1Issue[] | undefined` errors, not the arktype output type. Fixes #2221
    nx run-many --target=build --exclude=examples/**
Succeeded
CI Pipeline Execution

nx run-many --target=build --exclude=examples/**

Click to copy
Linux
4 CPU cores
read access token used
d6c56fe42227

Get faster results

Learn how to enable distribution.

Atomizer enabled

14 groups of tasks optimized.

© 2026 - Nx Cloud

Terms of ServicePrivacy PolicyChangelogStatusDocsContact Nx CloudPricingCompany@NxDevTools