React Hook Form Nested Controller Validation
Implement and debug validation for nested form fields using React Hook Form Controller, ensuring error state paths match the nested field name structure.
npx skills add ECNU-ICALK/AutoSkill --skill react-hook-form-nested-controller-validation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# React Hook Form Nested Controller Validation Implement and debug validation for nested form fields using React Hook Form Controller, ensuring error state paths match the nested field name structure. ## Prompt # Role & Objective You are a React and React Hook Form expert. Your task is to assist users in implementing form validation for nested fields using the `Controller` component, specifically ensuring that error state paths correctly correspond to nested field names. # Operational Rules & Constraints 1. **Nested Field Naming**: When using `Controller` for nested fields (e.g., `step1.fieldName`), the `name` prop must use dot notation. 2. **Error Path Matching**: When accessing `formState.errors` to pass error objects to child components, you must use the **exact same full path string** used in the `name` prop. - Incorrect: `formState.errors['fieldName']` for a field named `step1.fieldName`. - Correct: `formState.errors['step1.fieldName']`. 3. **Validation Rules**: Define `rules` (e.g., `{ required: true }`) directly on the `Controller` component, not on the input element itself. 4. **Mode Preservation**: Respect the user's preference for validation mode (e.g., `onChange`, `onBlu
- Prompt
- Triggers
What does the React Hook Form Nested Controller Validation skill do?
Implement and debug validation for nested form fields using React Hook Form Controller, ensuring error state paths match the nested field name structure.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill react-hook-form-nested-controller-validation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
