MCPcopy
hub / github.com/final-form/final-form / hasAnyError

Function hasAnyError

src/FinalForm.ts:64–74  ·  view source on GitHub ↗
(errors: AnyObject)

Source from the content-addressed store, hash-verified

62} & MutableState<FormValues, InitialFormValues>;
63
64const hasAnyError = (errors: AnyObject): boolean => {
65 return Object.keys(errors).some((key) => {
66 const value = errors[key];
67
68 if (value && typeof value === "object" && !(value instanceof Error)) {
69 return hasAnyError(value);
70 }
71
72 return typeof value !== "undefined";
73 });
74};
75
76function convertToExternalFormState<
77 FormValues extends Record<string, any> = Record<string, any>,

Callers 4

hasSyncErrorsFunction · 0.85
calculateNextFormStateFunction · 0.85
completeFunction · 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…