MCPcopy Index your code
hub / github.com/json-editor/json-editor / validate

Method validate

src/core.js:126–136  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

124 }
125
126 validate (value) {
127 if (!this.ready) throw new Error('JSON Editor not ready yet. Make sure the load method is complete')
128
129 /* Custom value */
130 if (arguments.length === 1) {
131 return this.validator.validate(value)
132 /* Current value (use cached result) */
133 } else {
134 return this.validation_results
135 }
136 }
137
138 destroy () {
139 if (this.destroyed) return

Callers 6

showValidationErrorsMethod · 0.95
loadMethod · 0.45
onChangeMethod · 0.45
setValueMethod · 0.45
buildMethod · 0.45
validator.spec.jsFile · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected