Skip to content

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

Description

@PadowYT2

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: runtimeThis issue affects the runtime of the library.scope: coreThis issue affects the core package, meaning any adapter is also affected by it.type: enhancementThis requests an enhancement to existing behaviour.v2This issue affects v2 as well.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions