Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

rhf-error-util

talhanr19MIT1.0.0TypeScript support: included

Lightweight utility hook for safely accessing errors in react-hook-form (nested or flat)

react-hook-form, react-hook-form-errors, react-hook-form-error, form-error, form-validation, field-error, nested-error, get-form-error, typescript, react, hook, form-hook, validation-error

readme

rhf-error-util

Lightweight utility for safely accessing deeply nested or flat error objects like in React Hook Form.

npm version license: MIT types: TypeScript minzipped size

✨ Features

  • Zero dependencies
  • Works with nested keys (e.g., "object.keys.keys")
  • Returns { message, ref, type } object
  • Can be used with or without React Hook Form

🚀 Install

npm install rhf-error-util