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

Function checkStrictTuple

docs/scripts/ajv-validator.js:5019–5027  ·  view source on GitHub ↗
(sch)

Source from the content-addressed store, hash-verified

5017 cxt.ok(valid);
5018 });
5019 function checkStrictTuple(sch) {
5020 const { opts, errSchemaPath } = it;
5021 const l = schArr.length;
5022 const fullTuple = l === sch.minItems && (l === sch.maxItems || sch[extraItems] === false);
5023 if (opts.strictTuples && !fullTuple) {
5024 const msg = `"${keyword}" is ${l}-tuple, but minItems or maxItems/${extraItems} are not specified or different at path "${errSchemaPath}"`;
5025 (0, util_1.checkStrictMode)(it, msg, opts.strictTuples);
5026 }
5027 }
5028 }
5029 exports.validateTuple = validateTuple;
5030 exports.default = def;

Callers 1

validateTupleFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected