2015-06-03 03:36:59 +03:00
|
|
|
{{# def.definitions }}
|
2015-12-12 16:41:51 +03:00
|
|
|
{{# def.errors }}
|
2015-12-22 20:03:09 +03:00
|
|
|
{{# def.setupKeyword }}
|
2015-12-21 01:35:13 +03:00
|
|
|
{{# def.$data }}
|
2015-12-20 23:42:33 +03:00
|
|
|
|
|
|
|
var division{{=$lvl}};
|
2015-12-25 23:04:15 +03:00
|
|
|
if ({{?$isData}}
|
|
|
|
{{=$schemaValue}} !== undefined && (
|
|
|
|
typeof {{=$schemaValue}} != 'number' ||
|
|
|
|
{{?}}
|
2016-01-02 20:16:01 +03:00
|
|
|
(division{{=$lvl}} = {{=$data}} / {{=$schemaValue}},
|
|
|
|
{{? it.opts.multipleOfPrecision }}
|
|
|
|
Math.abs(Math.round(division{{=$lvl}}) - division{{=$lvl}}) > 1e-{{=it.opts.multipleOfPrecision}}
|
|
|
|
{{??}}
|
|
|
|
division{{=$lvl}} !== parseInt(division{{=$lvl}})
|
|
|
|
{{?}}
|
|
|
|
)
|
2015-12-25 23:04:15 +03:00
|
|
|
{{?$isData}} ) {{?}} ) {
|
2015-06-12 13:43:41 +03:00
|
|
|
{{# def.error:'multipleOf' }}
|
2015-06-13 15:01:05 +03:00
|
|
|
} {{? $breakOnError }} else { {{?}}
|