Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect validation when using a decimal mask #2792

Open
skrasnoyarov opened this issue May 20, 2024 · 2 comments
Open

Incorrect validation when using a decimal mask #2792

skrasnoyarov opened this issue May 20, 2024 · 2 comments

Comments

@skrasnoyarov
Copy link

@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
@skrasnoyarov skrasnoyarov changed the title Incorrect validation with decimal mask Incorrect validation when using a decimal mask May 20, 2024
@Techn1c4l
Copy link

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.

@skrasnoyarov
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants