Open qobadzadeh opened 1 month ago
node.js
v20.10.0
v17.13.3
No response
ether standalone or sandbox
I was trying to validate a number with min and multiple methods at the same time where I faced this issue
validation:
Joi.object({ a: Joi.number().min(20000).multiple(1000) })
payload:
{ a: 2 }
TypeError: Cannot read properties of undefined (reading 'message')
I expected to get the related error something like:
Validation Error: "a" must be greater than or equal to 20000
or
Validation Error: "a" must be a multiple of 1000
There indeed seems to be an issue in the sandbox, but I'm unable to reproduce it in node, are you sure this happens outside of the sandbox?
Runtime
node.js
Runtime version
v20.10.0
Module version
v17.13.3
Last module version without issue
No response
Used with
ether standalone or sandbox
Any other relevant information
No response
What are you trying to achieve or the steps to reproduce?
I was trying to validate a number with min and multiple methods at the same time where I faced this issue
validation:
Joi.object({ a: Joi.number().min(20000).multiple(1000) })
payload:
{ a: 2 }
What was the result you got?
TypeError: Cannot read properties of undefined (reading 'message')
What result did you expect?
I expected to get the related error something like:
Validation Error: "a" must be greater than or equal to 20000
or
Validation Error: "a" must be a multiple of 1000