MCPcopy Create free account
hub / github.com/react-hook-form/react-hook-form / updateErrors

Function updateErrors

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

Source from the content-addressed store, hash-verified

310 };
311
312 const updateErrors = (name: InternalFieldName, error: FieldError) => {
313 set(_formState.errors, name, error);
314 _subjects.state.next({
315 errors: _formState.errors,
316 });
317 };
318
319 const _setErrors = (errors: FieldErrors<TFieldValues>) => {
320 _formState.errors = errors;

Callers 1

shouldRenderByErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected