Urara-Blog/node_modules/.pnpm-store/v3/files/cd/44780ba9829ca44c27e875ff05d12840ede25f4d575c4763a9cb9ba485f3bb86ea0f386e825b72f762408181a46eaa19c82206a0340b47df0e42d7c666ce85
2022-08-14 01:14:53 +08:00

16 lines
485 B
Text

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