Preview:
const schema = Joi.object({
    keyword_id: IdValidation()
      .when('keyword_ids', { not: Joi.exist(), then: Joi.optional(), otherwise: Joi.forbidden() }),
    keyword_ids: Joi.array().items(IdValidation().required()).min(1),
    keyword_value: Joi.string()
      .min(1)
      .max(constants.MAX_CHAR_LENGTH)
      .regex(constants.STRING_REGEX),
    class_ids: Joi.array().items(IdValidation().required()).min(1),
  });
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter