Fields and the resolver schema, side by side. The extension reads register(), <Controller>, and useController(), then compares those names with the object passed to zodResolver or valibotResolver.
What you can do
See every field in the React Hook Form sidebar. Click one to open it.
A warning appears when a field is not in the schema, and when a schema key has no field.
The CodeLens on a field jumps to the matching schema key.
address.city counts as the address key.
A schema const in the same file is followed. An export const schema in another file is followed when the name is unique.
Snippet: rhf.
It stays quiet until a package.json in the workspace depends on react-hook-form. Nothing is sent out of the editor.
Settings
Setting
Default
reactHookForm.codeLens
on
Links a field to its schema key.
reactHookForm.diagnostics.unknownField
on
Warns when a field is missing from the schema.
reactHookForm.diagnostics.unusedSchemaKey
on
Warns when a schema key has no field. Turn this off if fields are rendered in a loop.
Commands
Open the Command Palette and type React Hook Form.
React Hook Form: Refresh — rescan after adding the dependency.