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

オープン
#2,402 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
機能追加
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
react, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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

主要言語
TypeScript
スター
6.8k
フォーク
705
平均マージ
1日 6時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

TanStack/form のほかの issue

TanStack/form の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。