Skip to content

Commit

Permalink
Merge pull request hapijs#2666 from MathijsvVelde/master
Browse files Browse the repository at this point in the history
Updated `multiple` rule to support decimal/float base
  • Loading branch information
hueniverse authored Dec 1, 2021
2 parents e92e400 + 74ca92f commit f732265
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/types/number.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ module.exports = Any.extend({
},
validate(value, helpers, { base }, options) {

if (value % base === 0) {
if (value * (1 / base) % 1 === 0) {
return value;
}

Expand Down

0 comments on commit f732265

Please sign in to comment.