main
Last change
on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago |
F4 Finalna Verzija
|
-
Property mode
set to
100644
|
File size:
485 bytes
|
Rev | Line | |
---|
[79a0317] | 1 | import type {CodeKeywordDefinition} from "../../types"
|
---|
| 2 | import type {KeywordCxt} from "../../compile/validate"
|
---|
| 3 | import {checkStrictMode} from "../../compile/util"
|
---|
| 4 |
|
---|
| 5 | const 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 |
|
---|
| 16 | export default def
|
---|
Note:
See
TracBrowser
for help on using the repository browser.