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

[form] form 表单如何在自定义组件里面,获取errormessage, 希望有一个getFieldErrorMsg的功能 #2885

Open
Lyrics1 opened this issue May 9, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Lyrics1
Copy link

Lyrics1 commented May 9, 2024

这个功能解决了什么问题

定制化高的表单组件,需要根据业务错误信息展示的UI将会不一样,所以自定义组件中,可以先试用showErrorMessage:false 来禁用掉表单默认的错误展示位置,现在我想自己写一个错误信息展示的样式在组件中,如何获取对应组件name 的errorMessage?

你建议的方案是什么

form 属性中,新增一个getFieldErrorMsg的功能 默认true 返回所有的组件错误信息,这样用户可以根据错误信息来定制化错误提示展示样式

Copy link
Contributor

github-actions bot commented May 9, 2024

👋 @Lyrics1,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

@HaixingOoO HaixingOoO added the enhancement New feature or request label May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants