{"provider_url":"https://hatena.blog","title":"React Hook Form\u306e\u57fa\u672c\u307e\u3068\u3081 \u305d\u306e2 \uff08zod\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u30d1\u30bf\u30fc\u30f3\uff09","image_url":null,"author_name":"na_ah","published":"2024-10-20 23:13:23","author_url":"https://blog.hatena.ne.jp/na_ah/","description":"\u3053\u3093\u306b\u3061\u306f\uff01 \u4eca\u56de\u306f\u524d\u56de\u306b\u5f15\u304d\u7d9a\u304d\u3001React Hook Form (RHF) \u306b\u3064\u3044\u3066\u307e\u3068\u3081\u307e\u3059\u3002 zod\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u30d1\u30bf\u30fc\u30f3 import { useForm } from 'react-hook-form' import { z } from 'zod' import { zodResolver } from '@hookform/resolvers/zod' const schema = z.object({ name: z.string().min(1, '\u540d\u524d\u306f\u5fc5\u9808\u3067\u3059'), email: z.string().email('\u6b63\u3057\u3044\u30e1\u30fc\u30eb\u30a2\u30c9\u30ec\u30b9\u3092\u5165\u529b\u3057\u3066\u304f\u3060\u3055\u3044'), age:\u2026","blog_title":"na_ah\u306e\u30d6\u30ed\u30b0","version":"1.0","provider_name":"Hatena Blog","width":"100%","height":"190","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fna-ah.hatenablog.com%2Fentry%2F2024%2F10%2F20%2F231323\" title=\"React Hook Form\u306e\u57fa\u672c\u307e\u3068\u3081 \u305d\u306e2 \uff08zod\u3068\u7d44\u307f\u5408\u308f\u305b\u308b\u30d1\u30bf\u30fc\u30f3\uff09 - na_ah\u306e\u30d6\u30ed\u30b0\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","blog_url":"https://na-ah.hatenablog.com/","type":"rich","categories":[],"url":"https://na-ah.hatenablog.com/entry/2024/10/20/231323"}