Skip to content

Commit 9c009a9

Browse files
committed
validate numbers in multipleOf
1 parent 332b30d commit 9c009a9

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

lib/dot/multipleOf.jst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
{{# def.setupKeyword }}
44
{{# def.$data }}
55

6+
{{# def.numberKeyword }}
7+
68
var division{{=$lvl}};
79
if ({{?$isData}}
810
{{=$schemaValue}} !== undefined && (

spec/ajv.spec.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,13 @@ describe('Ajv', function () {
549549
});
550550
});
551551

552+
it('multipleOf', function() {
553+
passValidationThrowCompile({
554+
$ref: '#/foo',
555+
foo: {maxProperties: 'bar'}
556+
});
557+
});
558+
552559
function passValidationThrowCompile(schema) {
553560
ajv.validateSchema(schema) .should.equal(true);
554561
should.throw(function() {

0 commit comments

Comments
 (0)