MCPcopy Create free account
hub / github.com/json-editor/json-editor / anyOf

Method anyOf

src/validator.js:173–183  ·  view source on GitHub ↗
(schema, value, path)

Source from the content-addressed store, hash-verified

171 return schema.allOf.reduce(validate, [])
172 },
173 anyOf (schema, value, path) {
174 const valid = schema.anyOf.some(e => !this._validateSchema(e, value, path).length)
175 if (!valid) {
176 return [{
177 path,
178 property: 'anyOf',
179 message: this.translate('error_anyOf', null, schema)
180 }]
181 }
182 return []
183 },
184 oneOf (schema, value, path) {
185 let valid = 0
186 const oneofErrors = []

Callers

nothing calls this directly

Calls 1

_validateSchemaMethod · 0.95

Tested by

no test coverage detected