-
-
Notifications
You must be signed in to change notification settings - Fork 689
[v2] Make schema issues configurable for form-level report #2402
Copy link
Copy link
Open
Labels
area: runtimeThis issue affects the runtime of the library.This issue affects the runtime of the library.scope: coreThis issue affects the core package, meaning any adapter is also affected by it.This issue affects the core package, meaning any adapter is also affected by it.type: enhancementThis requests an enhancement to existing behaviour.This requests an enhancement to existing behaviour.v2This issue affects v2 as well.This issue affects v2 as well.
Description
Activity
Metadata
Metadata
Assignees
Labels
area: runtimeThis issue affects the runtime of the library.This issue affects the runtime of the library.scope: coreThis issue affects the core package, meaning any adapter is also affected by it.This issue affects the core package, meaning any adapter is also affected by it.type: enhancementThis requests an enhancement to existing behaviour.This requests an enhancement to existing behaviour.v2This issue affects v2 as well.This issue affects v2 as well.
Describe the bug
In the current v2, root schema validators copy all field issues into
form.state.errorsin addition having them infield.errorsYour minimal, reproducible example
https://codesandbox.io/p/devbox/nostalgic-firefly-ng66xx
Steps to reproduce
validatorsform.state.errorsreceives a copy of the field error issue alongside the form errorExpected behavior
This issue is best solved by having a configurable option for this behavior, so you are able to access form errors without getting the field errors
How often does this bug happen?
None
Screenshots or Videos
No response
Platform
All
TanStack Form adapter
react-form
TanStack Form version
v2.0.0-alpha.2
TypeScript version
No response
Additional context
No response