Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

关于 nz-form-control 组件 nzValidateStatus 属性问题 #693

Closed
cipchk opened this issue Dec 7, 2017 · 3 comments · Fixed by #696
Closed

关于 nz-form-control 组件 nzValidateStatus 属性问题 #693

cipchk opened this issue Dec 7, 2017 · 3 comments · Fixed by #696

Comments

@cipchk
Copy link
Member

cipchk commented Dec 7, 2017

What problem does this feature solve?

我们会用到 nzValidateStatus 几乎是在响应式表单中应用,然后其中 isErrorcode)明显受限于所列的错误状态才会有生效,这导致自定义验证器亦或部分angular内置(例如:min 等)会出现无效CSS渲染的问题。

就这一问题的根源来看,我认为是否有错误的判断标准只需要检验 name.errors 是否为 null 亦可,这种规则不光是 angular validators 在匹配正确的情况下都返回 null;当然这一点在自定义检验当中也形成一种默契规则。

What does the proposed API look like?

nothing

@ng-zorro-bot
Copy link
Collaborator

It will be better to write your issue/comment in English, so more people can understand you.
And this means that more people can help you or benefit from your issue/comment.

@vthinkxie
Copy link
Member

vthinkxie commented Dec 7, 2017

There is another nzValidateStatus called warning must be taken into consideration.

isError = this.nzValidateStatus && this.nzValidateStatus.dirty && this.nzValidateStatus.errors && this.nzValidateStatus.hasError && !this.nzValidateStatus.hasError('warning')

will be updated soon.

@lock
Copy link

lock bot commented Feb 18, 2019

This thread has been automatically locked because it has not had recent activity. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 18, 2019
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants