🐛Validation regression bug in [email protected]

Đang mở
#2,084 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Mishra-coder đang làm issue này rồi.

Từ ngày 23/3/2026.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với bản tái hiện StackBlitz được liên kết và so sánh các phiên bản 1.28.3 và 1.28.4 của @tanstack/react-form bằng các lệnh npm trong issue. Lặp lại chuỗi thao tác hiển thị trường, gửi, ẩn và gửi lại, đồng thời kiểm tra isTouched và trạng thái xác thực. Hoàn tất khi trường đã được đặt lại không còn gây ra lỗi xác thực sau khi bị ẩn.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
TypeScript
Star
6.8k
Fork
705
Merge trung bình
1 ngày 12 giờ
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/form

Tất cả issue của TanStack/form

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.