GifproGifpro

React Hook Form + Zod Validation: AI-Generated Code Example

CODE PREVIEW

P

Prompt

Create a landing page showcasing a form validation example using React Hook Form and Zod. Include a functional form with fields: name (required, min 2 chars), email (required, valid email), age (required, number 18-120). Display validation errors inline. Use Tailwind CSS for styling. Keep code concise.

React Hook FormとZodを使ったフォームバリデーションの実践デモ。名前(2文字以上)、メール(有効な形式)、年齢(18~120)の3項目をZodスキーマで検証し、エラーをインライン表示。ダークテーマでスタイリング。

Prompt Overview

Practical demo of form validation using React Hook Form and Zod. Three fields (name with 2+ characters, email with valid format, age 18-120) are validated with a Zod schema, with errors displayed inline. Styled with a dark theme.

Was this prompt helpful?

Comments

Comments appear after moderation

Homeヘルプ