diff options
Diffstat (limited to 'tests/draft2020-12/optional/format/regex.json')
-rw-r--r-- | tests/draft2020-12/optional/format/regex.json | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/draft2020-12/optional/format/regex.json b/tests/draft2020-12/optional/format/regex.json new file mode 100644 index 0000000..d99d021 --- /dev/null +++ b/tests/draft2020-12/optional/format/regex.json @@ -0,0 +1,18 @@ +[ + { + "description": "validation of regular expressions", + "schema": {"format": "regex"}, + "tests": [ + { + "description": "a valid regular expression", + "data": "([abc])+\\s+$", + "valid": true + }, + { + "description": "a regular expression with unclosed parens is invalid", + "data": "^(abc]", + "valid": false + } + ] + } +] |