TanStack / TanStack/form

No way to access errors for a group defined with `withFieldGroup`

Open
#1,652 8 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

type: enhancement v1 v2
Dominant language
TypeScript
Stars
6.7k
Forks
682
Avg merge
5d 18h
Merged PRs (30d)
7

Description

Describe the bug

When defining a group using withFieldGroup, it would be helpful to get a list of all of the errors for the group.

As an example, I have an address group. I'd like to render a list of errors at the group level (as opposed to the individual field level:

Image

However, the group store only contains values. You can get the form-level errorMap and sort of work backwards, but that's somewhat difficult. It would be really nice if the group store had an errorMap or something similar.

Your minimal, reproducible example

https://bolt.new/~/sb1-ehaxlmcw

Steps to reproduce

Here is an example of the kind of form I mean.

Expected behavior

It should be possible to get the errors for a group.

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

macOS/Chrome

TanStack Form adapter

None

TanStack Form version

1.15.1

TypeScript version

No response

Additional context

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the withFieldGroup implementation and the group store state, then use the linked minimal reproduction to trace how form-level errorMap entries are exposed. Define the group-level error result from the expected address-group behavior and verify that errors can be listed without relying on individual field rendering.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
56/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.