fix(form-core): revalidate nested fields on parent setFieldValue #2208
Openhemraj-007(GitHub profile, opens in a new tab)wants to merge 1 commit into
main fromrefs/pull/2208/headopened hemraj-007(GitHub profile, opens in a new tab) linked this to fix #2113
Sign in to join this conversation.
No actionable comments were generated in the recent review. 🎉
ℹ️ Recent review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID:
9f53c3db-406f-4677-beb1-826a30255609📥 Commits
Reviewing files that changed from the base of the PR and between 6a73479f2c2659550a6c8b456e3e139bf0d2142e and 8b4eb09d6a03c6945017d4c91aca639685417b71.
📒 Files selected for processing (4)
.changeset/nested-field-revalidate.mdpackages/form-core/CHANGELOG.mdpackages/form-core/src/FormApi.tspackages/form-core/tests/FormApi.spec.ts📝 Walkthrough
Walkthrough#
This PR fixes issue
#2113by adding group-aware revalidation of nested mounted fields when a parent object field is updated viasetFieldValue. The implementation validates all nested group-member fields, a regression test confirms the fix, and release metadata documents patch version bumps across all form packages.Changes#
Nested Field Revalidation Fix
packages/form-core/src/FormApi.ts,packages/form-core/tests/FormApi.spec.tssetFieldValuenow validates all mounted nested fields belonging to the updated field's group after value changes. Regression test verifies error clearing when parent field transitions from invalid to valid state..changeset/nested-field-revalidate.md,packages/form-core/CHANGELOG.md@tanstack/*-formpackages with the nested field revalidation fix for issue#2113.Estimated code review effort#
🎯 2 (Simple) | ⏱️ ~12 minutes
Suggested reviewers#
Poem#
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)#
✅ Passed checks (4 passed)
#2113: they implement revalidation of mounted nested fields when a parent object field is updated via setFieldValue, including a regression test that verifies the fix.#2113: adding revalidation logic to setFieldValue, updating changelogs, and adding a regression test.✨ Finishing Touches
🧪 Generate unit tests (beta)
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.
❤️ Share