Requires the size to be less than or equal to limit.
const schema = Joi.any().sizeof(20)
Requires the string to be valid ObjectId.
const schema = Joi.string().objectId()
Requires the string to be valid color hex code.
const schema = Joi.string().colorHexCode()
Requires the string to contain only ASCII characters.
const schema = Joi.string().ASCII()
Requires the array length to be even.
const schema = Joi.array().even()
Requires the array length to be odd.
const schema = Joi.array().odd()