Chilean RUT in React Hook Form: register vs Controller
Validate a Chilean RUT in React Hook Form with rut.ts and Zod — when to pick Controller, format on blur with `setValue`, and keep `formState.errors` fresh.
Validate a Chilean RUT in React Hook Form with rut.ts and Zod — when to pick Controller, format on blur with `setValue`, and keep `formState.errors` fresh.
Format a Chilean RUT on every keystroke with rut.ts `incremental` mode — cursor-stable controlled input, no manual mask state, no extra dependencies.
Type-safe Chilean RUT validation in Next.js App Router Server Actions with rut.ts and Zod — one shared schema, `useActionState`, and progressive enhancement.
Generate valid Chilean RUTs for tests, fixtures, and seeds in Vitest, Jest, and Playwright with rut.ts `generate()` — no placeholders, no dependencies.
Pick a canonical layout for Chilean RUTs (Postgres, MySQL, SQLite), normalize at the write boundary with rut.ts, and add UNIQUE + CHECK to block duplicates.
Build a reusable `@IsRut()` decorator with rut.ts (zero deps), plug it into NestJS' ValidationPipe, and ship strict mode, DTOs, and the 400 response.
Migrate from rut.js, @fdograph/rut-utilities, or validate-rut to rut.ts (TypeScript-native, zero deps) — API map, codemods, and v4 differences.
Chilean RUT acceptance gate that survives placeholders, unicode dashes, and Ley 19.628 PII logging — with `strict` mode and rut.ts safe-mode helpers.
Why `^[0-9]+-[0-9kK]$` and similar regex patterns can never validate a Chilean RUT — and the `isRutLike` + `validate` pipeline from rut.ts that does.
Worked example of the Modulo 11 algorithm for the Chilean RUT verifier digit, the TypeScript implementation, and the edge cases hand-rolled code misses.
Liking rut.ts?
Star on GitHubMIT License © 2026 Arrow Software