-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Support plan
- is this issue currently blocking your project? (yes/no): no
- is this issue affecting a production system? (yes/no): yes
Context
- node version: 14.15.4
- module version with issue: 17.3.0
- last module version without issue:
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): standalone
- any other relevant information:
What are you trying to achieve or the steps to reproduce?
var joi = require("joi")
const schema = joi.number();
schema.validate('1.9642346977926366E-5'); // => 0.000019642346977926367
schema.validate('1.9642346977926364E-5'); // => ValidationErrorhttps://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}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect