RobinHerbots/Inputmask

Incorrect validation when using a decimal mask

skrasnoyarov opened this issue · 2 comments

@RobinHerbots Hello! I use decimal mask with an unlimited number of decimal places. To validate the value, I use Inputmask.isValid and when entering 16 or 17 digits after the decimal point, the isValid function returns false. Is this a bug?

Example

Thank`s for your attention!

  • OS: macos Monterey 12.5.1
  • Browser: arc
  • Inputmask version 5.0.8

Do you really need that high number precision? JavaScript uses double-precision floating point which follows IEEE 754 with limitation of 64-bit precision (16 digits), so you can't expect it to work correctly when you have that many digits.

@Techn1c4l Hi. Thank you. I set the limit to 16 digits