我想分配 required 或者client_id
如果client_secret
这些属性之一不为空,我必须签入 Joi 分配它required
Joi
我该如何检查
schema = Joi.Object().keys({
account_id: Joi.string().required(),
client_id: Joi.string(), // in client_id or client_secret //
client_secret: Joi.string() // one must be required I have to check for This in Joi
});