})
function checkStrictTuple(sch: AnySchemaObject): void {
+ const {opts, errSchemaPath} = it
const l = schArr.length
const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false)
- if (it.opts.strictTuples && !fullTuple) {
- const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different`
- checkStrictMode(it, msg, it.opts.strictTuples)
+ if (opts.strictTuples && !fullTuple) {
+ const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`
+ checkStrictMode(it, msg, opts.strictTuples)
}
}
}