TanStack / TanStack/form

[v2] Blurring the field with "change" trigger clears errors.

Open
#2,341 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: runtime scope: core type: undecided v2
Dominant language
TypeScript
Stars
6.7k
Forks
682
Avg merge
5d 18h
Merged PRs (30d)
7

Description

Describe the bug

When a form has no blur validator blurring any input will clear errors from other triggers

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-fwx1qdqm?file=src%2Frhf-revalidate.tsx

Steps to reproduce
  1. Press submit
  2. Focus any field
  3. Blur the field & observe error dissapearing
Expected behavior

When I specify validator with only one trigger - "change", i want errors to persist blurring.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

every platform, not related to platform

TanStack Form adapter

react-form

TanStack Form version

2.0.0-alpha.1

TypeScript version

6.0.3

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 linked StackBlitz minimal reproduction, src/rhf-revalidate.tsx, and reproduce the issue by submitting, focusing a field, then blurring it. Trace how the React form adapter handles validation errors when only the change trigger is configured. Done means errors from the change trigger persist after blurring, with the reproduction steps no longer clearing them.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.