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

Fix Joi issue #2672: #2837

Closed

Conversation

martin-petersen
Copy link
Contributor

  • possibility to validate exponential notation strings with double precision problem by specifying a precision number instead of using unsafe specification

   - possibility to validate exponential notation strings with double precision problem by specifying a precision number instead of using unsafe specification
@martin-petersen
Copy link
Contributor Author

This PR fix issue #2672

@Marsup
Copy link
Collaborator

Marsup commented Sep 29, 2022

Thanks for your PR, but I don't think this should require a change in people's schema, 9.4e-1 is perfectly converted by parseFloat without a precision loss, the check afterwards is wrong though. I'm afraid it's going to involve a lot of string manipulation if we want to get this right and avoid javascript's approximations.

@Marsup
Copy link
Collaborator

Marsup commented Oct 22, 2022

Superseded by #2867, thanks for trying though.

@Marsup Marsup closed this Oct 22, 2022
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

Successfully merging this pull request may close these issues.

2 participants