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

Function validate

packages/core/src/util/validator.ts:41–53  ·  view source on GitHub ↗
(
  validator: ValidateFunction | undefined,
  data: any
)

Source from the content-addressed store, hash-verified

39};
40
41export const validate = (
42 validator: ValidateFunction | undefined,
43 data: any
44): ErrorObject[] => {
45 if (validator === undefined) {
46 return [];
47 }
48 const valid = validator(data);
49 if (valid) {
50 return [];
51 }
52 return validator.errors;
53};

Callers 3

core.test.tsFile · 0.90
cell.test.tsFile · 0.90
coreReducerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…