✨ Features
- Add Error Message component (#13472)
- Add the Error Message component for displaying validation errors from React Hook Form.
🐞 Fixes
- Fix stale validating state after
resetField()(#13735) - Fix errors and touched state remaining for rows removed by
replace()(#13734) - Fix stale resolver results updating form state after
reset()duringhandleSubmit()(#13733) - Fix nested registered errors being removed when
trigger()targets their parent (#13732) - Fix resolver-reported root errors being dropped during
handleSubmit()(#13731) - Fix parent errors being incorrectly set when
trigger()targets a field with only nested resolver errors (#13730) - Fix
useWatchcompute cache not being initialized with the initial output (#13728) - Fix
FileListbeing lost during flatten/expand and omit undefined values injsonToFormData(#13725) - Fix
schemaErrorLookupreporting nested containers as exact-name errors (#13727) - Fix
isValidatingnot being recomputed afterunregister()clears validating fields (#13723) - Fix stale resolver state updates after
reset()(#13722) - Fix
iterateFieldsByActiononly breaking out of one loop level (#13718) - Fix stale validation types surviving
setError()overwrites (#13716) - Fix
reset()not clearing validating fields (#13714) - Fix
remove()leaking deleted values onto surviving field-array items (#13713) - Fix the React Server build being unpublished (#13709)
- Fix
validateFieldcallingsetCustomValidityonce per key in validate-object mode (#13707) - Fix
useFieldArrayfocus behavior for checkboxes and radio buttons in appended rows (#13705) - Fix
getFieldStatereadingisValidatingfrom the supplied form state (#13704) - Fix
unregister()stripping kept values from the submit payload (#13703) - Fix
useFormStatenot re-subscribing when control changes (#13702) - Fix
reset()keepingdirtyFieldsout of sync withisDirtywhenkeepValuesis enabled (#13701) - Fix
useFormnot reconciling correctly when an Activity subtree is initially hidden (#13698) - Fix cleared errors returning after the
delayErrortimer fires (#13697) - Fix
cloneObjectthrowing when checkingBlobwithinstanceof(#13694) - Fix
useFieldArrayretaining stale fields after an Activity subtree reconnects (#13688)
🧹 Refactors
- Extend
_isTrackedto the remaining multi-key proxy/subscribe form-state checks (#13699) - Extract
_isTrackedhelper for proxy/subscribe form-state checks (#13690) - Remove the unused
abortEarlyparameter fromiterateFieldsByAction(#13689) - Remove redundant optional chaining from
clearErrors(#13696)
📝 Documentation
- Fix
useWatchcompute example variable names in JSDoc (#13700)
📦 Dependencies
- Bump
joifrom 18.2.1 to 18.2.5 (#13719)
❤️ Thank You
- Thanks to @soroush5, @bluebill1049, @Tnalxmsk, @zigzagdev, @dfedoryshchev, @Alioth-91, @giaBaoJS and @jliew for their contributions! 🎉