-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
bugBug or defectBug or defect
Milestone
Description
Support plan
- is this issue currently blocking your project? (yes/no): No
- is this issue affecting a production system? (yes/no): No
Context
- node version: v12.18.1
- module version with issue: 17.1.1
- last module version without issue: N/A
- 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?
const schema = Joi.number()
const result = schema.validate('2.')Testing more representations of numbers as strings after filing the issue #2406, the team also notices that trailing decimal points (which usually denotes a float number) will also cause number.unsafe to be thrown since there is no regular expression to remove the unnecessary trailing decimal point during number normalization.
What was the result you got?
error type 'number.unsafe'
What result did you expect?
{ error: null, value: 2 }Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugBug or defectBug or defect