How to validate with Joi on an object with known static keys and 3 unknown dynamic keys?

前端 未结 0 1591
忘掉有多难
忘掉有多难 2021-01-19 03:19
let s = { name: Joi.string().required() };
let t= Joi.object({
    a_dynamic_key: Joi.boolean(),
})
    .pattern(/^\\d+$/, Joi.boolean(), {
        matches: Joi.arra         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题