Skip to content
Source
Sign inSign up
TanStack/form

[v2] Make schema issues configurable for form-level report #2402

OpenPadowYT2(GitHub profile, opens in a new tab) opened this issue 0 comments

Describe the bug

In the current v2, root schema validators copy all field issues into form.state.errors in addition having them in field.errors

Your minimal, reproducible example

https://codesandbox.io/p/devbox/nostalgic-firefly-ng66xx

Steps to reproduce

  1. Attach a Standard Schema to root validators
  2. Trigger validation with an invalid field value
  3. Observe form.state.errors receives a copy of the field error issue alongside the form error

Expected 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

  1. LeCarbonator(GitHub profile, opens in a new tab) added labelstype: enhancement

  2. LeCarbonator(GitHub profile, opens in a new tab) added labelsscope: core

  3. LeCarbonator(GitHub profile, opens in a new tab) added labelsarea: runtime

Sign in to join this conversation.