@@ -71,25 +71,6 @@ module.exports = {
71
71
minItems : 1 ,
72
72
items : { type : 'string' } ,
73
73
} ,
74
- disallowedForPatterns : {
75
- type : 'array' ,
76
- uniqueItems : true ,
77
- items : { type : 'string' } ,
78
- } ,
79
- message : { type : 'string' } ,
80
- } ,
81
- required : [ 'disallowedFor' ] ,
82
- additionalProperties : false ,
83
- } ,
84
- {
85
- type : 'object' ,
86
- properties : {
87
- propName : { type : 'string' } ,
88
- disallowedFor : {
89
- type : 'array' ,
90
- uniqueItems : true ,
91
- items : { type : 'string' } ,
92
- } ,
93
74
disallowedForPatterns : {
94
75
type : 'array' ,
95
76
uniqueItems : true ,
@@ -98,10 +79,12 @@ module.exports = {
98
79
} ,
99
80
message : { type : 'string' } ,
100
81
} ,
101
- required : [ 'disallowedForPatterns' ] ,
82
+ anyOf : [
83
+ { required : [ 'disallowedFor' ] } ,
84
+ { required : [ 'disallowedForPatterns' ] } ,
85
+ ] ,
102
86
additionalProperties : false ,
103
87
} ,
104
-
105
88
{
106
89
type : 'object' ,
107
90
properties : {
@@ -130,25 +113,6 @@ module.exports = {
130
113
minItems : 1 ,
131
114
items : { type : 'string' } ,
132
115
} ,
133
- disallowedForPatterns : {
134
- type : 'array' ,
135
- uniqueItems : true ,
136
- items : { type : 'string' } ,
137
- } ,
138
- message : { type : 'string' } ,
139
- } ,
140
- required : [ 'disallowedFor' ] ,
141
- additionalProperties : false ,
142
- } ,
143
- {
144
- type : 'object' ,
145
- properties : {
146
- propNamePattern : { type : 'string' } ,
147
- disallowedFor : {
148
- type : 'array' ,
149
- uniqueItems : true ,
150
- items : { type : 'string' } ,
151
- } ,
152
116
disallowedForPatterns : {
153
117
type : 'array' ,
154
118
uniqueItems : true ,
@@ -157,7 +121,10 @@ module.exports = {
157
121
} ,
158
122
message : { type : 'string' } ,
159
123
} ,
160
- required : [ 'disallowedForPatterns' ] ,
124
+ anyOf : [
125
+ { required : [ 'disallowedFor' ] } ,
126
+ { required : [ 'disallowedForPatterns' ] } ,
127
+ ] ,
161
128
additionalProperties : false ,
162
129
} ,
163
130
] ,
0 commit comments