File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change 141
141
{{?}}
142
142
{{? $rulesGroup.type }}
143
143
}
144
- {{? $typeSchema && $typeSchema === $rulesGroup.type }}
144
+ {{? $typeSchema && $typeSchema === $rulesGroup.type && !$coerceToTypes }}
145
145
{{ var $typeChecked = true; }}
146
146
else {
147
147
{{
161
161
{{~}}
162
162
{{?}}
163
163
164
- {{? $typeSchema && !$typeChecked && !(it.opts.coerceTypes && $coerceToTypes) }}
164
+ {{? $typeSchema && !$typeChecked && !$coerceToTypes }}
165
165
{{# def.checkType }}
166
166
{{# def.error:'type' }}
167
167
}
Original file line number Diff line number Diff line change @@ -397,14 +397,14 @@ describe('Type coercion', function () {
397
397
} ) ;
398
398
399
399
400
- it . skip ( 'should generate one error for type with coerceTypes option (issue #469)' , function ( ) {
400
+ it ( 'should generate one error for type with coerceTypes option (issue #469)' , function ( ) {
401
401
var schema = {
402
402
"type" : "number" ,
403
403
"minimum" : 10
404
404
} ;
405
405
406
- instances . forEach ( function ( ajv ) {
407
- var validate = ajv . compile ( schema ) ;
406
+ instances . forEach ( function ( _ajv ) {
407
+ var validate = _ajv . compile ( schema ) ;
408
408
validate ( 9 ) . should . equal ( false ) ;
409
409
validate . errors . length . should . equal ( 1 ) ;
410
410
You can’t perform that action at this time.
0 commit comments