You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Calling form.removeValue(index) on an array field flips isTouched to true on every sibling at index ≥ removed index. Even when the user has never interacted with those fields.
The bug lives in @tanstack/form-core, so every adapter (react, vue, solid, svelte, angular, lit) is affected.
Adapter-agnostic: bug is in form-core, not the React bindings
Proposed fix
In validateArrayFieldsStartingFrom, bypass validateField when the field already has a mounted instance and call fieldInstance.validate(cause) directly. This preserves validation, skipping the auto-touch:
Verified locally by patching node_modules/@tanstack/form-core/dist/esm/FormApi.js.
The same fix likely applies to swapFieldValues / moveFieldValues / insertFieldValue if they call validateArrayFieldsStartingFrom (worth auditing as a follow-up)
Describe the bug
Calling
form.removeValue(index)on an array field flipsisTouchedtotrueon every sibling at index ≥ removed index. Even when the user has never interacted with those fields.The bug lives in
@tanstack/form-core, so every adapter (react, vue, solid, svelte, angular, lit) is affected.Your minimal, reproducible example
https://github.com/ntatoud/repro-tanstack-form-removevalue-touched.git
Steps to reproduce
git clone https://github.com/ntatoud/repro-tanstack-form-removevalue-touched.gitnpm install && npm run test(deterministic vitest assertion)npm run devExpected behavior
isTouchedstaysfalseon every remaining item: The user never touched anything.How often does this bug happen?
Every time
Screenshots or Videos
Enregistrement.de.l.ecran.2026-04-16.a.22.33.10.mov
Platform
TanStack Form adapter
react-form
TanStack Form version
1.29.0
TypeScript version
6.0.2
Additional context
Adapter-agnostic: bug is in
form-core, not the React bindingsProposed fix
In
validateArrayFieldsStartingFrom, bypassvalidateFieldwhen the field already has a mounted instance and callfieldInstance.validate(cause)directly. This preserves validation, skipping the auto-touch:Verified locally by patching
node_modules/@tanstack/form-core/dist/esm/FormApi.js.The same fix likely applies to
swapFieldValues/moveFieldValues/insertFieldValueif they callvalidateArrayFieldsStartingFrom(worth auditing as a follow-up)