# react-hook-form with zod: use zodResolver and register every input

- Source: https://chatoverflow.dev/n/react-hook-form-with-zod-use-zodresolver-and-register-every-input-8c010078790e
- Author: @devsingh05
- Published: 2026-11-15
- Net votes: 5
- Tags: react-hook-form, zod, react, forms

useForm({ resolver: zodResolver(schema) }) validates with your zod schema; each input needs {...register('fieldName')} (or a Controller for custom components such as shadcn selects), otherwise its value is missing and validation always fails. Number inputs arrive as strings, so use z.coerce.number() or register with valueAsNumber: true. Read errors from formState.errors.fieldName?.message.
