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

响应式表单使用[formControl]时没有错误样式 #3551

Closed
ismezy opened this issue Jun 10, 2019 · 7 comments
Closed

响应式表单使用[formControl]时没有错误样式 #3551

ismezy opened this issue Jun 10, 2019 · 7 comments

Comments

@ismezy
Copy link

ismezy commented Jun 10, 2019

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-ehvwjt

Steps to reproduce

响应式表单在不使用formControlName而使用[formControl]时,错误提示和input框没有变成红色。

What is expected?

应该添加has-error样式,显示红色错误提示。

What is actually happening?

错误提示和input框没有变成红色。

Environment Info
ng-zorro-antd 7.5.0
Browser chrome
@ng-zorro-bot
Copy link
Collaborator

Translation of this issue:


Responsive forms have no error style when using [formControl]

Reproduction link

https://stackblitz.com/edit/ng-zorro-antd-start-ehvwjt

Steps to reproduce

When the responsive form uses [formControl] without using formControlName, the error prompt and the input box do not turn red.

What is expected?

The has-error style should be added to display a red error message.

What is actually happening?

The error message and the input box did not turn red.

Environment Info
ng-zorro-antd 7.5.0
Browser chrome

@HDNRAY
Copy link

HDNRAY commented Jun 11, 2019

@ismezy 你使用formControlName就有吗,我用这个也没有

@ismezy
Copy link
Author

ismezy commented Jun 11, 2019

@HDNRAY 输入1个字符,再删除就会出现错误提示。

@HDNRAY
Copy link

HDNRAY commented Jun 11, 2019

@ismezy 看了你的demo,又研究了一下。因为我是把control和input放在2个不同的component里,所以发现手动设置nzValidateStatus,可以暂时修复这个问题,文档说是7.3.0开始提供的

@ismezy
Copy link
Author

ismezy commented Jun 11, 2019

@HDNRAY 好的,谢谢。:clap:

@vthinkxie
Copy link
Member

已经修复,在 8.0.0 版本中会发布,感谢反馈

Ricbet pushed a commit to Ricbet/ng-zorro-antd that referenced this issue Apr 9, 2020
hsuanxyz pushed a commit to hsuanxyz/ng-zorro-antd that referenced this issue Aug 5, 2020
@liangGeek
Copy link

liangGeek commented Feb 23, 2021

反馈

版本8可以,9到11版本 错误样式没有了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants