getDeepErrorEntries

Retrieves the errors of a specific field or the entire form as a list of entries, each pairing the path to a field with its error messages. This is useful for building custom error summaries that link each message back to its field.

const entries = getDeepErrorEntries<TSchema>(form);
const entries = getDeepErrorEntries<TSchema, TFieldPath>(form, config);

Generics

Parameters

Explanation

The form parameter is the form store to retrieve error entries from. The optional config parameter scopes the collection to a specific field's subtree via a path (when omitted, the entire form is walked). Each returned entry contains the path to a field and its non-empty list of errors.

Returns

Primitives

Methods

Contributors

Thanks to all the contributors who helped make this page better!

  • GitHub profile picture of @fabian-hiller

Partners

Thanks to our partners who support the project ideally and financially.

Sponsors

Thanks to our GitHub sponsors who support the project financially.

  • GitHub profile picture of @vasilii-kovalev
  • GitHub profile picture of @UpwayShop
  • GitHub profile picture of @ruiaraujo012
  • GitHub profile picture of @hyunbinseo
  • GitHub profile picture of @nickytonline
  • GitHub profile picture of @kibertoad
  • GitHub profile picture of @caegdeveloper
  • GitHub profile picture of @Thanaen
  • GitHub profile picture of @bmoyroud
  • GitHub profile picture of @ysknsid25
  • GitHub profile picture of @dslatkin