🐛Validation regression bug in [email protected]

Offen
#2,084 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Mishra-coder arbeitet bereits daran.

Seit 23.3.2026.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
45/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
react, typescript
Bereich
frontend

Rechercherichtung

Beginne mit der verknüpften StackBlitz-Reproduktion und vergleiche die Versionen 1.28.3 und 1.28.4 von @tanstack/react-form mithilfe der npm-Befehle im Issue. Wiederhole die Sequenz zum Anzeigen, Absenden, Ausblenden und erneuten Absenden des Felds und überprüfe dabei isTouched und den Validierungsstatus. Als erledigt gilt die Aufgabe, wenn das zurückgesetzte Feld nach dem Ausblenden keinen Validierungsfehler mehr verursacht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

v1 v2: needs investigation
Describe the bug

There appears to be a regression introduced in [email protected] where validation is firing on submit but not in [email protected].

After showing and hiding the field isTouched is false for 1.28.3 but true for 1.28.4

Your minimal, reproducible example

https://stackblitz.com/edit/vitejs-vite-wr2gnlx5

Steps to reproduce
  1. Check "Enter first name"
  2. Click "Submit", you will see a "You must enter a name" error
  3. Uncheck "Enter first name"
  4. Click "Submit"
  5. You should see an alert indicating the submission was successful and the were no validation errors

In the terminal run, the following and repeat the steps

npm i @tanstack/[email protected]
npm install && npm run dev

This time the validation runs again on submit causing a validation error preventing submission

Expected behavior

I would expect the same behaviour across both version, specifically for the field to not be validated as it's been reset

How often does this bug happen?

Every time

Screenshots or Videos

No response

Platform

See reproduction

TanStack Form adapter

react-form

TanStack Form version

v1.28.3

TypeScript version

No response

Additional context

No response

Vorherrschende Sprache
TypeScript
Sterne
6.8k
Forks
705
Ø Merge
1 T. 12 Std.
Gemergte PRs (30 T.)
14

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/form

Alle Issues in TanStack/form

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.