We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
var joi = require("joi") const schema = joi.number(); schema.validate('1.9642346977926366E-5'); // => 0.000019642346977926367 schema.validate('1.9642346977926364E-5'); // => ValidationError
https://runkit.com/tworoger/60094327f1b8ed001a128f13
{error: exports.ValidationError: "value" must be a safe number, value: 0.000019642346977926364}
{value: 0.000019642346977926364}
The text was updated successfully, but these errors were encountered:
I'm looking at this issue.
Sorry, something went wrong.
fix: better unsafe check of exponential numbers
2775bd4
Fixes #2542. Fixes #2672.
Marsup
Successfully merging a pull request may close this issue.
Support plan
Context
What are you trying to achieve or the steps to reproduce?
https://runkit.com/tworoger/60094327f1b8ed001a128f13
What was the result you got?
{error: exports.ValidationError: "value" must be a safe number, value: 0.000019642346977926364}
What result did you expect?
{value: 0.000019642346977926364}
The text was updated successfully, but these errors were encountered: