rhf-zod-schema-integration
Installation
SKILL.md
React Hook Form + Zod Schema Integration
The Integration Pattern
React Hook Form v7 + Zod provides fully type-safe, validated forms:
'use client'
import { useForm } from 'react-hook-form';
import { zodResolver } from '@hookform/resolvers/zod';
import { z } from 'zod';
// 1. Define Zod schema
const schema = z.object({
email: z.string().email('Invalid email'),
password: z.string().min(8, 'Minimum 8 characters'),
});