Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

using min and multiple methods together #3051

Open
qobadzadeh opened this issue Oct 29, 2024 · 0 comments
Open

using min and multiple methods together #3051

qobadzadeh opened this issue Oct 29, 2024 · 0 comments
Labels
bug Bug or defect

Comments

@qobadzadeh
Copy link

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

@qobadzadeh qobadzadeh added the bug Bug or defect label Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bug or defect
Projects
None yet
Development

No branches or pull requests

1 participant