@@ -15,12 +15,12 @@ let data = {
15
15
const validator = validatorBuilder ( )
16
16
. newRule ( )
17
17
. withField ( 'platform' )
18
- . validate ( RuleBuilder . isIn . withValues ( 'MOBILE' , 'DESKTOP' ) )
18
+ . validate ( RuleBuilder . isIn . withValues ( 'MOBILE' , 'DESKTOP' ) . build ( ) )
19
19
. validate ( RuleBuilder . required ( ) )
20
20
. newRule ( )
21
21
. withFieldValueConstraint ( 'platform' , 'mobile' )
22
22
. withField ( 'os' )
23
- . validate ( RuleBuilder . isIn . withValues ( 'ANDROID' , 'iOS' , 'WINDOWS' ) )
23
+ . validate ( RuleBuilder . isIn . withValues ( 'ANDROID' , 'iOS' , 'WINDOWS' ) . build ( ) )
24
24
. validate ( RuleBuilder . required ( ) )
25
25
. withField ( 'programming_lang' )
26
26
. validate (
@@ -30,29 +30,31 @@ const validator = validatorBuilder()
30
30
RuleBuilder . composite
31
31
. all ( )
32
32
. withSubRule ( RuleBuilder . exactValue . withPathAndValue ( 'os' , 'ANDROID' ) )
33
- . withSubRule ( RuleBuilder . isIn . withValues ( 'JAVA' , 'KOTLIN' ) )
33
+ . withSubRule ( RuleBuilder . isIn . withValues ( 'JAVA' , 'KOTLIN' ) . build ( ) )
34
34
. build ( )
35
35
)
36
36
. withSubRule (
37
37
RuleBuilder . composite
38
38
. all ( )
39
39
. withSubRule ( RuleBuilder . exactValue . withPathAndValue ( 'os' , 'iOS' ) )
40
- . withSubRule ( RuleBuilder . isIn . withValues ( 'SWIFT' , 'OBJECTIVE-C' ) )
40
+ . withSubRule (
41
+ RuleBuilder . isIn . withValues ( 'SWIFT' , 'OBJECTIVE-C' ) . build ( )
42
+ )
41
43
. build ( )
42
44
)
43
45
. withSubRule (
44
46
RuleBuilder . composite
45
47
. all ( )
46
48
. withSubRule ( RuleBuilder . exactValue . withPathAndValue ( 'os' , 'WINDOWS' ) )
47
- . withSubRule ( RuleBuilder . isIn . withValues ( 'C#' ) )
49
+ . withSubRule ( RuleBuilder . isIn . withValues ( 'C#' ) . build ( ) )
48
50
. build ( )
49
51
)
50
52
. build ( )
51
53
)
52
54
. newRule ( )
53
55
. withFieldValueConstraint ( 'platform' , 'DESKTOP' )
54
56
. withField ( 'os' )
55
- . validate ( RuleBuilder . isIn . withValues ( 'WINDOWS' , 'LINUX' ) )
57
+ . validate ( RuleBuilder . isIn . withValues ( 'WINDOWS' , 'LINUX' ) . build ( ) )
56
58
. withField ( 'programming_lang' )
57
59
. validate (
58
60
RuleBuilder . composite
@@ -61,14 +63,16 @@ const validator = validatorBuilder()
61
63
RuleBuilder . composite
62
64
. all ( )
63
65
. withSubRule ( RuleBuilder . exactValue . withPathAndValue ( 'os' , 'WINDOWS' ) )
64
- . withSubRule ( RuleBuilder . isIn . withValues ( 'JAVA' , 'C/C++' , 'C#' ) )
66
+ . withSubRule (
67
+ RuleBuilder . isIn . withValues ( 'JAVA' , 'C/C++' , 'C#' ) . build ( )
68
+ )
65
69
. build ( )
66
70
)
67
71
. withSubRule (
68
72
RuleBuilder . composite
69
73
. all ( )
70
74
. withSubRule ( RuleBuilder . exactValue . withPathAndValue ( 'os' , 'LINUX' ) )
71
- . withSubRule ( RuleBuilder . isIn . withValues ( 'JAVA' , 'C/C++' ) )
75
+ . withSubRule ( RuleBuilder . isIn . withValues ( 'JAVA' , 'C/C++' ) . build ( ) )
72
76
. build ( )
73
77
)
74
78
. build ( )
0 commit comments