Hi,
I was validating a schema with a 0 and got "field" must be a positive number. I looked into the code and so that it's a strict comparison, for .negative() as well.
If I remember my math classes right, 0 is both negative and positive, not the other way around :bowtie:
If it's ok for you, I'll make a (small) PR to fix that.
It seems to be neither : http://www.mathopenref.com/positive-number.html
If you do need that you can always Joi.number().min(0).
joi.number().positive().allow(0)
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
Most helpful comment
If you do need that you can always
Joi.number().min(0).