forms-and-validationlisted
Install: claude install-skill BenMacDeezy/Orns-Forge
<!-- last-verified: 2026-07 -->
# Forms & schema validation
## 1. React Hook Form + Zod/Valibot — the current stack
As of 2026, the verified baseline is **react-hook-form v7 (7.80+)** with
**`@hookform/resolvers` v5**, backing **Zod v4** or **Valibot**.
- `@hookform/resolvers` v5 ships a dedicated `valibotResolver`
(`@hookform/resolvers/valibot`) for Valibot schemas, plus a separate
generic `standardSchemaResolver`
(`@hookform/resolvers/standard-schema`) for any Standard-Schema-
compliant library (Zod, Valibot, ArkType) when a library-specific
resolver isn't wanted. **`zodResolver` itself only accepts Zod schemas
and has no Standard Schema fallback** — never point a Valibot schema at
it [verified against react-hook-form/resolvers source, 2026-07: the
zod resolver type-guards on Zod v3/v4 only]. Confirm the resolver
package version in `package.json` before assuming an import path
exists; pin/verify against
https://github.com/react-hook-form/resolvers/releases at build time.
- **One schema, one source of truth**: define the Zod/Valibot schema once
and derive both the TypeScript type (`z.infer<typeof schema>`) and the
runtime validator from it — don't hand-write a parallel TS `interface`
that can drift from the schema.
- **Validate at the boundary twice**: client-side (RHF + resolver) for UX,
server-side (the same or an equivalent schema) for correctness — client
validation is a UX convenience, never a security control. A request can
always