Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form-level validation does not always clear errors #1182

Open
tomas-c opened this issue Feb 25, 2025 · 0 comments
Open

Form-level validation does not always clear errors #1182

tomas-c opened this issue Feb 25, 2025 · 0 comments
Labels

Comments

@tomas-c
Copy link

tomas-c commented Feb 25, 2025

Describe the bug

The example below contains a simple form with two fields and form-level validation which returns errors on both fields if both fields have a non-empty value. In some cases the errors on fields are not cleared.

Your minimal, reproducible example

https://stackblitz.com/edit/tanstack-form-6tyuthpn

Steps to reproduce

  1. Run this stackblitz example
  2. Type one character into 'firstName'
  3. Type one character into 'lastName'
  4. Now erase 'firstName' contents

It's important to follow this order of steps and to only to type one character into each field. If, for example, you repeat the steps but type two characters into each box, the issue will not happen.

Expected behavior

Both field errors should have disappeared but actually only one of the errors disappears.

How often does this bug happen?

Every time

Screenshots or Videos

Screen.Recording.2025-02-25.at.20.13.38.mov

TanStack Form adapter

react-form

TanStack Form version

0.45.1

@Balastrong Balastrong added the bug label Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants