【发布时间】:2017-05-19 00:53:01
【问题描述】:
我搜索了很多,但没有发现在Joi 中允许进行多种类型验证
链接:https://github.com/hapijs/joi
我想用这样的东西:
validate: {
type: joi.or([
joi.string(),
joi.array(),
])
};
【问题讨论】:
-
my post below 回答您的问题了吗?如果是这样,那么您可以考虑accepting the answer,以便其他人在搜索此主题时看到它已得到回答。
标签: javascript node.js hapijs joi