Skip to content

Commit 8f5d9e2

Browse files
committed
regex validation
1 parent f11ddc3 commit 8f5d9e2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/draft3/format.json

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
[
2+
{
3+
"description": "validation of regular expressions",
4+
"schema": {"format": "regex"},
5+
"tests": [
6+
{
7+
"description": "a valid regular expression",
8+
"data": "([abc])+\\s+$",
9+
"valid": true
10+
},
11+
{
12+
"description": "a regular expression with unclosed parens is invalid",
13+
"data": "^(abc]",
14+
"valid": false
15+
}
16+
]
17+
}
18+
]

0 commit comments

Comments
 (0)