initial commit
This commit is contained in:
16
node_modules/ajv/lib/vocabularies/validation/limitContains.ts
generated
vendored
Normal file
16
node_modules/ajv/lib/vocabularies/validation/limitContains.ts
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
import type {CodeKeywordDefinition} from "../../types"
|
||||
import type {KeywordCxt} from "../../compile/validate"
|
||||
import {checkStrictMode} from "../../compile/util"
|
||||
|
||||
const def: CodeKeywordDefinition = {
|
||||
keyword: ["maxContains", "minContains"],
|
||||
type: "array",
|
||||
schemaType: "number",
|
||||
code({keyword, parentSchema, it}: KeywordCxt) {
|
||||
if (parentSchema.contains === undefined) {
|
||||
checkStrictMode(it, `"${keyword}" without "contains" is ignored`)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
export default def
|
||||
Reference in New Issue
Block a user