如何在NG-无效解析的类被添加到形成 [英] How does the ng-invalid-parse class get added to form

查看:118
本文介绍了如何在NG-无效解析的类被添加到形成的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用的形式现场验证一个自定义的角度指令。

I am using a custom angular directive for validation of a field in a form.

在验证中的一个失败,并自定义错误以来,类 NG-无效-解析也被添加到该领域。

When one of the validation fails, along with the custom error, the class ng-invalid-parse is also added to the field.

这是正常的行为呢?如果是这样,是什么原因呢?

Is it normal behavior? If so, what causes it?

推荐答案

NG-无效-解析当解析器返回undefined被添加,没有验证将在之后那个叫

ng-invalid-parse gets added when a parser returns undefined, no validation will be called after that.

更多信息: AngularJS文档

这篇关于如何在NG-无效解析的类被添加到形成的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆