Skip to content
Source
Sign inSign up
TanStack/form

[v2] Migrate and improve unit test coverage of some files #2436

MergedLeCarbonator(GitHub profile, opens in a new tab)merged 8 commits intoalpha fromrefs/pull/2436/headmerged by LeCarbonator(GitHub profile, opens in a new tab)

Showing 16 changed files with 13 additions and 1 deletion (loading 13).

x
0 of 16 viewed, 16 left
5 additions and 0 deletions.changeset/fast-yaks-kneel.mdAdded
View file
@@ -0,0 +1,5 @@
+---
+'@tanstack/form-core': patch
+---
+​
+`onSubmit` now has access to `createErrorMap`
1 addition and 1 deletionpackages/form-core/src/FieldApi/fieldTree.lib.tsModified
View file
@@ -450,7 +450,7 @@
reattachFormGroups()
​
-export function canPruneField(field: AnyInternalFieldApi): boolean {
+function canPruneField(field: AnyInternalFieldApi): boolean {
if (field._isKilled) return false
​
if (field._refCount > 0) return false
7 additions and 0 deletionspackages/form-core/src/FormApi/FormApi.public.tsModified
View file
@@ -9,6 +9,7 @@
ParsedStandardSchemaIssues,
ToFormErrorTypes,
ToFormOutputs,
+ ValidationErrorMap,
} from '../validation.public'
import type { StandardSchemaV1Issue } from '../standardSchema.public'
import type { FormListeners } from '../listeners.public'