Skip to content

fix: clear validation rules removed from register options at runtime - #13758

Merged
bluebill1049 merged 2 commits into
react-hook-form:masterfrom
soroush5:fix/clear-removed-register-rules
Sep 18, 2026
Merged

bluebill1049 merged 2 commits into
react-hook-form:masterfrom
soroush5:fix/clear-removed-register-rules

Conversation

@soroush5

Copy link
Copy Markdown
Contributor

Removing a validation rule at runtime had no effect — re-registration only added keys, never cleared them. Rules absent from the incoming options are now cleared, so optional fields stop blocking submit.

Verified: 3 new tests fail before and pass after, full suite green.

Fixes #13757

@bluebill1049
bluebill1049 merged commit e9c507c into react-hook-form:master Sep 18, 2026
6 checks passed
@soroush5

Copy link
Copy Markdown
Contributor Author

Thanks for merging.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Validation rule removed at runtime is still enforced

2 participants