[v2] Make schema issues configurable for form-level report

Đang mở
#2,402 0 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

Chưa có ai nhận issue này.

Đá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
65/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
backend-api-design

Hướng nghiên cứu

Look at the root schema validation logic in the TanStack Form v2 codebase, likely in the core validation or state management files. The issue mentions copying field issues into form.state.errors; find where this copying occurs and add a configuration option to control it. Test by running the provided CodeSandbox example and verifying that form.state.errors no longer contains field errors when the option is set.

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

Mô tả

area: runtime scope: core type: enhancement v2
Describe the bug

In the current v2, root schema validators copy all field issues into form.state.errors in addition having them in field.errors

Your minimal, reproducible example

https://codesandbox.io/p/devbox/nostalgic-firefly-ng66xx

Steps to reproduce
  1. Attach a Standard Schema to root validators
  2. Trigger validation with an invalid field value
  3. Observe form.state.errors receives a copy of the field error issue alongside the form error
Expected behavior

This issue is best solved by having a configurable option for this behavior, so you are able to access form errors without getting the field errors

How often does this bug happen?

None

Screenshots or Videos

No response

Platform

All

TanStack Form adapter

react-form

TanStack Form version

v2.0.0-alpha.2

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 7 giờ
Pull request đã merge (30 ngày)
13

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.