File tree Expand file tree Collapse file tree 1 file changed +0
-7
lines changed
Expand file tree Collapse file tree 1 file changed +0
-7
lines changed Original file line number Diff line number Diff line change @@ -101,7 +101,6 @@ export default function DataValidator(schema) {
101101
102102 let minItems = getKeyword ( schema , 'minItems' , 'min_items' ) ;
103103 let maxItems = getKeyword ( schema , 'maxItems' , 'max_items' ) ;
104- let choices = getKeyword ( schema . items , 'choices' , 'enum' ) ;
105104
106105 if ( minItems && data . length < parseInt ( minItems ) )
107106 this . addError ( coords , 'Minimum ' + minItems + ' items required.' ) ;
@@ -120,12 +119,6 @@ export default function DataValidator(schema) {
120119 }
121120 }
122121
123- if ( choices ) {
124- let invalid_choice = data . find ( ( i ) => choices . indexOf ( i ) === - 1 ) ;
125- if ( typeof invalid_choice !== 'undefined' )
126- this . addError ( coords , 'Invalid choice + "' + invalid_choice + '"' ) ;
127- }
128-
129122 let next_validator = this . getValidator ( next_type ) ;
130123
131124 // currently allOf is not supported in array items
You can’t perform that action at this time.
0 commit comments