Skip to content
Source
Sign inSign up
TanStack/form

Async validator doesn't re-trigger `isValidating` after first failed validation #2372

Send to my agent
OpenAlexanderHott(GitHub profile, opens in a new tab) opened this issue 0 comments

Describe the bug

When you have a form with an async validator, the field().state.meta.isValidating property doesn't go back to true when you trigger the async validation after the first time.

Your minimal, reproducible example

https://stackblitz.com/~/github.com/AlexanderHott/tanstack-solid-form-async-validator-bug

Steps to reproduce

  1. Type admin
  2. See Checking username... message for 2000ms
  3. Wait for Username is already taken
  4. Backspace until the username is empty
  5. Type asdf

Expected behavior

I expect the Checking username... message to appear again, because the validator is validating, but there is no pending/loading message.

The validator error does show up correctly afterwards.

How often does this bug happen?

Every time

Screenshots or Videos

https://github.com/user-attachments/assets/40bde457-4991-40d0-a9ca-29a32d9d4e29

Platform

  • OS: Linux 7.0.0-30-generic
  • Browser: Chrome 148.0.7778.178

TanStack Form adapter

solid-form

TanStack Form version

1.33.5

TypeScript version

5.9.3

Additional context

I think the relevant code is here https://github.com/TanStack/form/blob/b865ef335a69aa08a2f160895258f13e03773467/packages/form-core/src/FieldApi.ts#L1508-L1535

Sign in to join this conversation.