# Changelog
## [7.86.0] - 2026-08-22
### Added
- Type-safe `getErrors` method
### Performance
- Improve `createFormControl`
- Improve clone object check
- Avoid cloning values in `unregister` without subscribers
### Fixed
- Field array update leaving stale errors and touched state at the updated index
- `flatten` discarding `File` and `Blob` values instead of treating them as leaf nodes
- `validateField` not passing the field error to `setCustomValidity` when `criteriaMode` is `all`
- `hasValidation` treating falsy but valid values (`min: 0`, `max: 0`, `minLength: 0`, `maxLength: 0`, `required: ''`) as no validation
- `setValue` targeting a nested leaf not notifying a `Controller` registered on a field array item root
- `setValues` not updating fields registered under an object or array value
- `useWatch` returning a stale value on name change when the new value is `null`
- `unregister` inverting `keepDirty` when broadcasting `isDirty`
## [7.85.0] - 2026-08-08
### Added
- Support ``
### Fixed
- `getFieldState` error resolution from a field path
- `useWatch` discarding `useForm({ defaultValues })` in favor of its own `defaultValue` before the form mounts
- `setValue` emitting a duplicate `values` state notification for fields without a native input ref
- Stale render re-creating a field array path vacated by an array action
- `useFieldArray` root-level error (`errors.name.root`) being lost on `append`/`prepend`/`insert`/`remove`
- `min`/`max` validation being skipped for `valueAsDate` fields
## [7.84.0] - 2026-08-01
### Improvements
- `handleSubmit` returns the typed result of the `onValid` callback instead of discarding it
- `
` supports a function-based `action` (Server Action style) in addition to URL-string actions
- Improve performance and reduce bundle size
### Fixed
- `reset()` with `resetOptions.keepDirtyValues` freezing clean sibling fields in a nested object when another field in that object is dirty
- Restore missing `FieldArray` and `FormState` type exports
- `setValues` not notifying `useFieldArray` subscribers, leaving rendered fields stale
## [7.83.0] - 2026-07-25
### Improvements
- Enhance `getEventValue` to handle file inputs
- Improve TypeScript performance with a hard cap at 10 levels of recursive type depth
### Fixed
- Clear internal errors state on argument-less `clearErrors()`
- Preserve `dirtyFields` reference stability
- Old checkbox/radio elements polluting internal field state
- `useController` not re-subscribing `onChange`/`onBlur` when `control` changes
- Allow validation messages to be defined even if their related value is `undefined`
## [7.82.0] - 2026-07-18
### Added
- Opt-in `delayError` option for `setValue` to delay validation error updates
### Fixed
- Expose `resetDefaultValues` through form context
- `setValue` with `shouldDirty` not updating dirty state correctly when the form is disabled
- Preserve `dirtyFields` boolean values for registered array fields
- Restore `FieldArray` component export
### Performance
- Improve `getDirtyFields` performance, especially for larger forms and deeply nested values
## [7.81.0] - 2026-07-05
### Added
- `FieldArray` component built on `useFieldArray` for controlled field-array rendering
### Fixed
- `clearErrors` changing the `name` value from `form.subscribe`
- `reset` triggering `subscribe` with the latest name instead of `undefined`
- `setValues` leaving stale elements behind when shrinking a field array
- `flatten` preserving `Date` values as leaf nodes
- `useFieldArray` min length validation error changing location in the `errors` object
- `useController` not reflecting a cleared parent object in controlled fields
### Security
- Harden `unset()` against prototype-path traversal (`__proto__` / `constructor` / `prototype`), matching the existing `set()` guard
### Performance
- Improve re-render with `useFieldArray` reset
## [7.80.0] - 2026-06-20
### Added
- `disabled` prop support for individual fields within `useFieldArray`
### Fixed
- `deepEqual` incorrectly treating empty array `[]` and empty plain object `{}` as equal
### Performance
- Improve `onChange`, `setValid`, dirty checking, `setValue`, and `setValues` performance
## [7.79.0] - 2026-06-13
### Added
- `disabled` option to `useFieldArray`
### Fixed
- `Controller` `onChange` promise return type
- `deepEqual` false positives with shared object references
- `shouldUseNativeValidation` behavior for radio groups
- `createFormControl` stability with fast refresh in dev mode
- `StrictMode` value preservation during remount
- `formState.errors` reactivity with React compiler
## [7.78.0] - 2026-06-08
### Fixed
- Recover `Controller` fields after `reset` without rerender (RN issue #13455)
- `useFormState().isDirty` race with async resolver in `onChange` mode
- Use reactive `values` prop over `defaultValues` when `shouldUnregister` is true
- `deepEqual` for empty non-plain objects
### Types
- Update `dirtyFields` typing for field arrays with undefined entries
## [7.77.0] - 2026-05-31
### Added
- `resetDefaultValues` API
### Fixed
- Stale `isDirty` in `subscribe` payload after `reset(..., { keepValues: true })`
- Preserve values with `shouldUnregister`
- Inconsistent `reset({})` behavior requiring double-call to take effect
- `FieldArray` errors overriding nested fields
### Security
- Harden `get()` against prototype-path traversal (`__proto__` / `constructor` / `prototype`)
### Performance
- Bundle size reduction
## [7.76.1] - 2026-05-23
### Fixed
- Revert notify all matching field-array roots on nested `setValue` updates
- Revert treat `NaN` as empty when `valueAsNumber` is `true` in `validateField`
- `setValues` pass `options` parameter through to enable validation
- `setValues` emit whole-form change without stale `name`/`type`
### Performance
- `setValues` skip redundant per-field deep clones
- `setValues` thread `skipClone` through `setFieldValue`
## [7.76.0] - 2026-05-16
### Added
- Improve `isDirty` sync with `dirtyFields` state
### Fixed
- Preserve `formState.defaultValues` when `useFieldArray` and `watch` are used together
- Preserve nested resolver field-array errors in `trigger()`
- Notify all matching field-array roots on nested `setValue` updates
- `useFieldArray` `remove` leaves array with empty object when using `values` prop
- Preserve reset values for conditionally mounted `Controller` fields with `shouldUnregister`
- Propagate `setValues` updates to mounted `Controller` fields
- Native validation tooltip suppression caused by duplicate submit-error focus
- `append({ obj: null })` silently replaced by `defaultValues` after `remove()`
- Errors state when using form-level validation
- `isValidating` reactivity when `validatingFields` is not subscribed
## [7.75.0] - 2026-05-02
### Added
- Improve `getDirtyFields` to prune empty fields
- TypeScript 6.0 support
### Fixed
- Include `setValues` in `FormProvider` context value
- Preserve watch updates on field array unmount
- Prevent `useWatch` re-render when unrelated field validation occurs
- Recompute `isDirty` after re-registering a previously unregistered field
## [7.74.0] - 2026-04-26
### Added
- `setValues` API
### Fixed
- Preserve previous field value when `useController` name changes
- Handle null parent when unregistering nested field
- Treat `NaN` as empty when `valueAsNumber` is `true` in `validateField`
## [7.73.1] - 2026-04-21
### Fixed
- Reverted `setValues` that was accidentally included in patch; fix build to exclude test files
## [7.73.0] - 2026-04-18
### Added
- Improve `subscribe` API performance
### Performance
- Memoize submit handler
- Improve `deepEqual` performance
### Fixed
- Safely access `field._f` during register
- Improve `fieldState` errors when resolver uses dot-notation string keys
- Update state correctly in watch callback with `Controller`, `trigger`, and `reset`
- Skip field array validation when mode is `onBlur`
- `isDirty` remains false after deleting an item with `shouldDirty: true`
- Handle nested field when parent `defaultValue` is null
- Skip re-render in `setValue` when value is unchanged
## [7.72.1] - 2026-04-03
### Fixed
- Prevent `setValue` with `shouldDirty` from polluting unrelated dirty fields
- Memoize control in `HookFormControlContext` to prevent render conflicts
- `isNameInFieldArray` should check all ancestor paths for nested field arrays
- `formState.isValid` incorrect on `Controller` re-mount
## [7.72.0] - 2026-03-22
### Added
- Built-in form-level `validate` option
- Subscribe `formState` to track submit state
### Fixed
- Checkbox form validation ignored with native validation
- Prevent `useFieldArray` from marking unrelated fields as dirty
## [7.71.2] - 2026-02-21
### Fixed
- `clearErrors` emit name signal for targeted field updates
- Use `DeepPartialSkipArrayKey` for `WatchObserver` value parameter
## [7.71.1] - 2026-01-14
### Fixed
- Issue with `booleans_as_integers` value handling
## [7.71.0] - 2026-01-11
### Changed
- Separate control context to prevent unnecessary rerenders
- Memoize `FormProvider` context value to prevent unnecessary rerenders
### Fixed
- Update `isValid` when field `disabled` state changes
## [7.70.0] - 2026-01-04
### Fixed
- Prevent field array ghost elements with `keepDirtyValues`
- Improve `watch` return types
- Improve invalid date handling in `deepEqual` and validation
- Handle branded types correctly in `DeepPartial`
- Fix native validation focus issue
- Prevent duplicate subscription trigger in `setValue`
## [7.69.0] - 2025-12-20
### Added
- Align `` API with `useWatch`
### Fixed
- Security: CVE-2025-67779, CVE-2025-55184, CVE-2025-55183, CVE-2025-55182
- Preserve `isValid` state when `keepIsValid` option is used
- Ensure `createFormControl.subscribe` subscription listens only to subscribed changes
- Batch `isValidating` state updates with validation result
- Resolve race condition between `setError` and `setFocus`
## [7.68.0] - 2025-12-04
### Added
- `` component
### Fixed
- Clear validation errors synchronously in `reset()` to fix Next.js 16 Server Actions issue
## [7.67.0] - 2025-11-29
### Added
- `exact` option for `useController` props
### Fixed
- Allow `undefined` value with async `defaultValues` in `Controller`
- Correct `PathValueImpl` type inference
## [7.66.1] - 2025-11-18
### Performance
- Reduce redundant property access in `getDirtyFields`
### Fixed
- Skip `setValid()` during batch array updates
- Recompute `isValid` after `reset` when values update asynchronously
- Handle NaN comparison correctly using `Object.is` in `deepEqual`
## [7.66.0] - 2025-11-01
### Added
- `useWatch` and `useController` now react to `name` prop changes
### Fixed
- `watch()` returning `undefined` immediately after `reset()`
- Correct render function parameter typing for `` component
## [7.65.0] - 2025-10-11
### Added
- `` component
### Fixed
- Respect parent-provided `useFieldArray` rules
- `getDirtyFields` submit fields with `null` values when using `useForm`
## [7.64.0] - 2025-10-04
### Added
- Support optional array fields in `PathValueImpl` type
### Fixed
- Preserve `Controller`'s `defaultValue` with `shouldUnregister` prop
## [7.63.0] - 2025-09-20
### Added
- Improve get dirty fields logic
- Extra form values accessible via `formState`
### Fixed
- Only execute trigger function when deps has a valid array
- Unregister previous field when switching conditional Controllers
- Use field name to update `isValidating` fields
## [7.62.0] - 2025-08-02
### Fixed
- Sync two `defaultValues` after `reset` with new `defaultValues`
- Field name type conflict in nested `FieldErrors`
- Prevent `onBlur` for `readOnly` fields
- Do not override prototype of `data` in `cloneObject`
## [7.61.1] - 2025-07-24
### Fixed
- Reverted `watch` return type change based on `defaultValue` (caused regressions)
## [7.61.0] - 2025-07-24
### Added
- `compute` prop for `useWatch` subscription
### Fixed
- Subscribe with latest `defaultValues`
- Trigger watch callbacks only in response to value changes
- Track name with `setValue` subscription callbacks
- Handle explicit `"multipart/form-data"` encType in `` component
- Remove React wildcard import to resolve ESM build issues
## [7.60.0] - 2025-07-05
### Added
- `reset` with `keepFieldsRef` option to keep fields reference
### Fixed
- Remove `Set` from clone object
## [7.59.0] - 2025-06-28
### Added
- Support deep equality checking with circular references
### Fixed
- Issue with `formData` reference clone
- Issue with `undefined` value for submit data
- `useWatch` object variable param handling
## [7.58.0] - 2025-06-15
### Added
- `FieldArrayPathByValue` type
- Use `stringToPath` to prevent errors at field names containing quotes
### Fixed
- Incorrect `formControl` return from `useForm`
- Initial `useFieldArray` fields population
## [7.57.0] - 2025-06-02
### Added
- Focus form field for errors supplied via `errors` prop
- Export `UseFormResetFieldOptions` type for `resetField` API
- Root errors count in schema error lookup
### Fixed
- Type info for callback args in `subscribe`
- Proper types for `form.subscribe`
- `useController` focus function runtime issue
- `setValue` skips values not in own properties (prevents infinite call stack with self-referencing proto)
- Checkbox duplication handling in `useFieldArray`
- `mode` and `reValidateMode` reactivity
- Default value being overwritten by `values` prop regression
## [7.56.0] - 2025-04-20
### Added
- Reactive `mode` and `reValidateMode` support
- `isReady` state for subscription
### Fixed
- Regression on move/swap in `useFieldArray` input update
- Use `useIsomorphicLayoutEffect` to address SSR warning
## [7.55.0] - 2025-03-29
### Added
- `createFormControl` and `subscribe` function
- Infer resolver output types
- Allow components with `useController` hook to be memoized
- Track disabled fields and only omit data on submit
- Stable reference for `useWatch` `defaultValue`
- `handleSubmit` with native events support
### Fixed
- Type inference for `useFormContext`
- `values` and `defaultValues` work correctly with `createFormControl` and `useMemo`
- Prevent infinite render with condition check
- Valid state update with `onBlur` mode
- `disabled` field value not returned as `undefined` in resolver
- `revalidateMode` issue with `useFieldArray` validation
- `useController` unregister issue with strict mode
- `setError` in `useEffect` not working inside `FormProvider` context
- `useController` return props reference stability
## [7.54.0] - 2024-12-09
### Changed
- `useForm` return methods will be memorized based `formState` update
## [7.53.0] - 2024-8-31
### Added
- add support for `onBlur` with formState `isValid`
### Changed
- `validateFields` will only trigger re-render for async validation
## [7.51.0] - 2024-3-2
### Added
- added 'validateFields' to formState
```tsx
const {
formState: { validateFields },
} = useForm();
```
## [7.49.0] - 2023-12-10
### Added
- add reactive `errors` prop at `useForm`
```tsx
useForm({
errors, // Server errors
});
```
## [7.48.0] - 2023-11-05
### Added
- added new `disabled` prop for `useForm` to disable the entire form
```
const App = () => {
const [disabled, setDisabled] = useState(false);
const { handleSubmit } = useForm({ disabled });
return (