source: trip-planner-front/node_modules/ajv/lib/vocabularies/validation/limitContains.ts@ 84d0fbb

Last change on this file since 84d0fbb was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 485 bytes
Line 
1import type {CodeKeywordDefinition} from "../../types"
2import type {KeywordCxt} from "../../compile/validate"
3import {checkStrictMode} from "../../compile/util"
4
5const def: CodeKeywordDefinition = {
6 keyword: ["maxContains", "minContains"],
7 type: "array",
8 schemaType: "number",
9 code({keyword, parentSchema, it}: KeywordCxt) {
10 if (parentSchema.contains === undefined) {
11 checkStrictMode(it, `"${keyword}" without "contains" is ignored`)
12 }
13 },
14}
15
16export default def
Note: See TracBrowser for help on using the repository browser.