Repository navigation
fix(form-core): clear form errors only on change - #2453
suryaprakashsingh1705-sys wants to merge 1 commit into
Conversation
|
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Error clearing conditions and regression test packages/form-core/src/FormApi.ts, packages/form-core/tests/FormApi.spec.ts |
Submit and server errors clear only after error-free change validation. A regression test checks that blur preserves an existing form-level submit error. |
Priority:
Estimated code review effort: 2 (Simple) | ~8 minutes
Change: Bug fix · Severity of issue fixed: Low
Possibly related PRs
- TanStack/form#2436: Adds tests for event-specific error clearing and replacement behavior addressed by this change.
- TanStack/form#2448: Adds tests for event-error clearing rules related to the updated validation condition.
Suggested reviewers: lecarbonator
Merge Risk: 
Minimal · up to e5ebe
-
No actionable merge-blocking risk remains.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Title check
-
Explanation
The title "fix(form-core): clear form errors only on change" matches the main change. The summary says validateSync now clears submit and server errors only when validation is triggered by change and produces no errors. The title is specific and follows a conventional commit style. It names the package and the behavior. It does not mention the added regression test, but that is a minor supporting detail.
Full details: Docstring Coverage
-
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files.
-
Full details: Description check
-
Explanation
The description contains only the unchanged template. The "🎯 Changes" section is empty and has only the HTML comment prompt. It does not explain what changed or why. The checklist items are all unchecked, including the test item and the changeset item under Release Impact. The change touches published code in packages/form-core, so a changeset is likely required, but the author has not indicated one was generated.
Resolution
Fill in the "🎯 Changes" section. Describe the change and its motivation. State that validateSync now clears submit and server errors only on change validation with no errors, and that this fixes blur clearing a form-level onSubmit error. Check the test checkbox after running pnpm test:pr, or explain why tests do not apply. Check the Release Impact item for published code and add a changeset, or mark the change as docs/CI/dev-only if that is correct.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Comment @coderabbitai help to get the list of available commands.
🎯 Changes
✅ Checklist
pnpm test:pr, or these tests do not apply to this pull request.🚀 Release Impact
Summary by CodeRabbit