MCPcopy Create free account
hub / github.com/eclipsesource/jsonforms / getErrorsAt

Function getErrorsAt

packages/core/src/store/jsonFormsCore.ts:15–32  ·  view source on GitHub ↗
(
    instancePath: string,
    schema: JsonSchema,
    matchPath: (path: string) => boolean
  )

Source from the content-addressed store, hash-verified

13
14const getErrorsAt =
15 (
16 instancePath: string,
17 schema: JsonSchema,
18 matchPath: (path: string) => boolean
19 ) =>
20 (state: JsonFormsCore): ErrorObject[] => {
21 const errors = state.errors ?? [];
22 const additionalErrors = state.additionalErrors ?? [];
23 return errorsAt(
24 instancePath,
25 schema,
26 matchPath
27 )(
28 state.validationMode === 'ValidateAndHide'
29 ? additionalErrors
30 : [...errors, ...additionalErrors]
31 );
32 };
33
34export const errorAt = (instancePath: string, schema: JsonSchema) =>
35 getErrorsAt(instancePath, schema, (path) => path === instancePath);

Callers 2

errorAtFunction · 0.85
subErrorsAtFunction · 0.85

Calls 1

errorsAtFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…