TanStack
OSS
form
Sign in / Sign up
Open main menu
form
GitHub
Overview
Runs
Analytics
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
2227
e3af80d2 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
by tsushanth
t
Previous page
Previous
Next
Next page