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

Method _validateCustomValidator

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

Source from the content-addressed store, hash-verified

951 }
952
953 _validateCustomValidator (schema, value, path) {
954 const errors = []
955 /* Internal validators using the custom validator format */
956 errors.push(...ipValidator.call(this, schema, value, path, this.translate))
957
958 const validate = validator => {
959 errors.push(...validator.call(this, schema, value, path))
960 }
961 /* Custom type validation (global) */
962 this.defaults.custom_validators.forEach(validate)
963 /* Custom type validation (instance specific) */
964 if (this.options.custom_validators) {
965 this.options.custom_validators.forEach(validate)
966 }
967 return errors
968 }
969
970 _removeDuplicateErrors (errors) {
971 return errors.reduce((err, obj) => {

Callers 1

_validateSchemaMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected