File tree 2 files changed +41
-0
lines changed
2 files changed +41
-0
lines changed Original file line number Diff line number Diff line change
1
+ [
2
+ {
3
+ "description" : " divisibleBy validation" ,
4
+ "schema" : {"divisibleBy" : 1.5 },
5
+ "tests" : [
6
+ {
7
+ "description" : " zero is divisible by anything (except 0)" ,
8
+ "data" : 0 ,
9
+ "valid" : true
10
+ },
11
+ {
12
+ "description" : " 4.5 is divisible by 1.5" ,
13
+ "data" : 4.5 ,
14
+ "valid" : true
15
+ },
16
+ {
17
+ "description" : " 35 is not divisible by 1.5" ,
18
+ "data" : 35 ,
19
+ "valid" : false
20
+ }
21
+ ]
22
+ }
23
+ ]
Original file line number Diff line number Diff line change
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
+ ]
You can’t perform that action at this time.
0 commit comments