-
-
Notifications
You must be signed in to change notification settings - Fork 305
Open
Labels
questionFurther information is requestedFurther information is requested
Description
It seems that v.multipleOf tries to find the remainder of the input divided by the requirement. This might not yield an appropriate result if their division has floating point precision errors:
const Length = v.pipe(v.number(), v.multipleOf(0.01), v.description('in meters, with centimeter precision'));
toJsonSchema(Length) // {"type": "number", "multipleOf": 0.01, "description": ...}
v.parse(Length, 3); // Invalid multiple: Expected %0.01 but received 3Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested