-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Context
- joi version: 15.1.1 & HEAD
What are you trying to achieve or the steps to reproduce ?
const schema = Joi.number();
schema.validate('1e3'); // => { value: 1000 }
schema.validate(1E3); // => { value: 1000 }
schema.validate('1E3'); // failsWhich result you had ?
{
value: 1000,
error: [Error [ValidationError]: "value" must be a safe number] {
_original: '1E3',
details: [ [Object] ]
}
}What did you expect ?
{ value: 1000 }Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect