Joi.object({password: Joi.string().min(6).required().message('Password is required!')});
Uncaught:
Error: Cannot apply rules to empty ruleset or the last rule added does not support rule properties
at new module.exports (/Users/yovasx2/idpartner/node_modules/@hapi/hoek/lib/error.js:23:19)
at module.exports (/Users/yovasx2/idpartner/node_modules/@hapi/hoek/lib/assert.js:21:11)
at internals.Base.rule (/Users/yovasx2/idpartner/node_modules/joi/lib/base.js:479:9)
at internals.Base.method [as message] (/Users/yovasx2/idpartner/node_modules/joi/lib/extend.js:145:29)
but inverting min and required works
Joi.object({password: Joi.string().required().min(6).message('Password is required!')});
node 16.16 joi 17.6.1
but inverting min and required works
it works