hapijs / joi

The most powerful data validation library for JS
Other
20.94k stars 1.51k forks source link

fix: precision issue on number().multiple() #3013

Closed Marsup closed 10 months ago

Marsup commented 10 months ago

Fixes #2962.

Comparison method borrowed and adapted from https://stackoverflow.com/questions/7037926/javascript-how-to-tell-if-one-number-is-a-multiple-of-another