Double patterns for uniques, for square brackets as well

This commit is contained in:
Yair Morgenstern 2023-09-22 10:55:43 +03:00
parent 1891a37c66
commit 08816c7f6b

View File

@ -1,7 +1,19 @@
{
"$schema": "http://json-schema.org/draft-07/schema",
"type": "array",
"items": {
"type": "string",
"pattern": "^[^><]*(\\<[^>]*\\>[^><]*)*$"
"allOf": [
{
"type": "string",
"description": "All <> brackets come in pairs",
"pattern": "^[^><]*(\\<[^>]*\\>[^><]*)*$"
},
{
"type": "string",
"description": "All [] brackets come in pairs",
"pattern": "^[^\\[\\]]*(\\[[^\\[\\]]*\\][^\\[\\]]*)*$"
}
]
}
}