Skip to content

docs: sync UseFormProps type with current source (add validate, formControl)#1210

Merged
bluebill1049 merged 1 commit intoreact-hook-form:masterfrom
dfedoryshchev:docs/sync-useformprops-type-with-source
May 2, 2026
Merged

docs: sync UseFormProps type with current source (add validate, formControl)#1210
bluebill1049 merged 1 commit intoreact-hook-form:masterfrom
dfedoryshchev:docs/sync-useformprops-type-with-source

Conversation

@dfedoryshchev
Copy link
Copy Markdown
Contributor

Related to #1178.

The UseFormProps type block on the /ts page is missing two fields that have shipped: validate and formControl. Source has both at src/types/form.ts:130-134 (verified against the v7.73.0 tag, the latest released).

  • validate: ValidateForm<TFieldValues> is the form-level validate API already documented at useform.mdx:283-290 as a useForm option. ValidateForm is publicly re-exported via src/index.ts -> src/types -> src/types/validator.ts.
  • formControl?: Omit<UseFormReturn<...>, 'formState'> is consumed at src/useForm.ts:69-86 when passed (it spreads into the internal control and runs formControl.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 /ts matches 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.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 1, 2026

@dfedoryshchev is attempting to deploy a commit to the BEEKAI OSS Team on Vercel.

A member of the Team first needs to authorize it.

@netlify
Copy link
Copy Markdown

netlify Bot commented May 1, 2026

Deploy Preview for sage-cassata-31d224 ready!

Name Link
🔨 Latest commit 4475301
🔍 Latest deploy log https://app.netlify.com/projects/sage-cassata-31d224/deploys/69f52ec86f9a120008226d04
😎 Deploy Preview https://deploy-preview-1210--sage-cassata-31d224.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@bluebill1049 bluebill1049 merged commit bcc1dec into react-hook-form:master May 2, 2026
4 of 8 checks passed
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.

2 participants