【发布时间】:2017-10-25 06:08:06
【问题描述】:
我正在使用 tv4 来检测架构错误。
我尝试使用以下方法获取所有结果:tv4.validateMultiple 调用,该调用检测到多个错误但没有说明位置或原因。
tv4 有什么方法可以提供更详细的故障信息吗?
var res = tv4.validateMultiple(data, schema,null,true);
errors:[]
0:{}
message:"Missing required property: coMMand"
name:"ValidationError"
type:"Error"
1:{}
message:"Unknown property (not in schema)"
name:"ValidationError"
type:"Error"
2:{}
message:"Unknown property (not in schema)"
name:"ValidationError"
type:"Error"
【问题讨论】:
标签: javascript node.js tv4