docs: sync UseFormProps type with current source (add validate, formControl)#1210
Merged
bluebill1049 merged 1 commit intoreact-hook-form:masterfrom May 2, 2026
Conversation
Contributor
|
@dfedoryshchev is attempting to deploy a commit to the BEEKAI OSS Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for sage-cassata-31d224 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
bluebill1049
approved these changes
May 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #1178.
The
UseFormPropstype block on the/tspage is missing two fields that have shipped:validateandformControl. Source has both atsrc/types/form.ts:130-134(verified against the v7.73.0 tag, the latest released).validate: ValidateForm<TFieldValues>is the form-levelvalidateAPI already documented atuseform.mdx:283-290as auseFormoption.ValidateFormis publicly re-exported viasrc/index.ts -> src/types -> src/types/validator.ts.formControl?: Omit<UseFormReturn<...>, 'formState'>is consumed atsrc/useForm.ts:69-86when passed (it spreads into the internal control and runsformControl.reset(defaultValues, resetOptions)on change). PR #12878 was a bugfix on this exact prop, confirming it as a public option.Adds those two fields to the type block so the signature on
/tsmatches source. Out of scope: the generic parameter constraints in the docs block (TContext extends object = object,TTransformedValues extends FieldValues | undefined = undefined) differ stylistically from source (TContext = any,TTransformedValues = TFieldValues); not changing those here.