MCPcopy
hub / github.com/ajv-validator/ajv / errorsText

Method errorsText

lib/core.ts:655–663  ·  view source on GitHub ↗
(
    errors: ErrorObject[] | null | undefined = this.errors, // optional array of validation errors
    {separator = ", ", dataVar = "data"}: ErrorsTextOptions = {} // optional options with properties `separator` and `dataVar`
  )

Source from the content-addressed store, hash-verified

653 }
654
655 errorsText(
656 errors: ErrorObject[] | null | undefined = this.errors, // optional array of validation errors
657 {separator = ", ", dataVar = "data"}: ErrorsTextOptions = {} // optional options with properties `separator` and `dataVar`
658 ): string {
659 if (!errors || errors.length === 0) return "No errors"
660 return errors
661 .map((e) => `${dataVar}${e.instancePath} ${e.message}`)
662 .reduce((text, msg) => text + separator + msg)
663 }
664
665 $dataMetaSchema(metaSchema: AnySchemaObject, keywordsJsonPointers: string[]): AnySchemaObject {
666 const rules = this.RULES.all

Callers 3

validateSchemaMethod · 0.95
testFunction · 0.80
validateKeywordUsageFunction · 0.80

Calls

no outgoing calls

Tested by 1

testFunction · 0.64