MCPcopy Index your code
hub / github.com/react-hook-form/react-hook-form / updateErrors

Function updateErrors

src/logic/createFormControl.ts:326–332  ·  view source on GitHub ↗
(name: InternalFieldName, error: FieldError)

Source from the content-addressed store, hash-verified

324 };
325
326 const updateErrors = (name: InternalFieldName, error: FieldError) => {
327 set(_formState.errors, name, error);
328 _formState.errors = { ..._formState.errors };
329 _subjects.state.next({
330 errors: _formState.errors,
331 });
332 };
333
334 const _setErrors = (errors: FieldErrors<TFieldValues>) => {
335 _formState.errors = errors;

Callers 1

shouldRenderByErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…