在 angular 模式表单中验证表单元素时获取 "Please add error message"

Getting "Please add error message" while validating form element in angular schema form

我目前正在使用 angular-schema-form (https://github.com/json-schema-form/angular-schema-form) 生成基于 json 模式的表单。表单按预期生成,但在验证时给我一个错误 "Please add error message for tv4-xxx" 以及实际的验证消息。

注意:如果重要的话,我的工作代码使用 UI-Bootstrap 而不是 Bootstrap。

我尝试过的事情:

  1. 创建了本地代码并导入了所有必需的依赖项和 运行 应用程序。我能够使用相应的错误消息成功验证表单字段,但我没有收到 "Please add error message for tv4-xxx" 错误消息。

  2. 我的工作代码使用 bower 添加它的所有依赖项,据我所知,它已经在代码中添加了所有必需的依赖项,但它仍然会出现此错误。

错误截图:

Validation error message

预期是实际验证错误,但它 returns 消息 "Please add error message for tv4-xxx" 以及不希望出现的实际验证错误。

原来我们的 angular 应用程序验证了两次,一次是通过 angular-auto-validate 库,一次是 TV4.js,它被 angular-schema- 内部使用形式。

angular-schema-form 发出的错误代码未被 angular-auto-validate 识别,因此得到 "Please add error message for tv4-xxx"。

禁用验证解决了问题。