TanStack / TanStack/form

isValidating state updates to false before debounced async validation completes

Open
#2,045 2 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

Describe the bug

isValidating form state updates to false before debounced async validation completes. For example when the first async validation is resolving and a second async validation is triggered, once the first async validation resolves, isValidating is set to false even though the second async validation is still in flight.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-s6svm3er?file=src%2Findex.tsx

Steps to reproduce
  1. Type in "erro" in firstname
  2. Wait roughly half a second then add an "r" to make "error"
  3. isValidating disappears -> false
  4. After about half a second later the error appears
Expected behavior

As a user I expect, isValidating to be true whenever there is an async validation in flight. So the isValidating... text should not disappear before all async validations have completed. My specific use-case is showing a loading state while async validation is ongoing, however since the isValidating
state becomes false early this can be misleading to users.

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

Google Chrome

TanStack Form adapter

react-form

TanStack Form version

1.28.3

TypeScript version

v5.8.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 minimal reproduction in src/index.tsx from the linked StackBlitz example and follow the async validation flow for consecutive firstname inputs. Reproduce the issue by typing “erro”, waiting, then adding “r”; done means isValidating remains true until all in-flight validation completes and the error appears.

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.