Skip to content

form 表单校验错误信息页面不显示 #2597

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

Closed
1 task
luichooy opened this issue Jul 23, 2020 · 4 comments
Closed
1 task

form 表单校验错误信息页面不显示 #2597

luichooy opened this issue Jul 23, 2020 · 4 comments

Comments

@luichooy
Copy link

luichooy commented Jul 23, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Version

1.6.2

Environment

macos

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击 Submit按钮提交表单

What is expected?

在校验没有通过的情况下,FormItem 的错误提示信息 help 能正常生成显示

What is actually happening?

  1. 如果 input 中有输入,则校验通过,validateFileds 回调函数会执行
  2. 如果 input 中没有输入,则校验信息会在控制台 console 打印,但是 FormItem的提示信息 help 没有显示出来
    尝试过同样的页面使用 FormModel 写法是可以显示出错误信息,使用Form 组件并且用getFieldDecorator装饰表单域就不行

然后尝试不使用 tsx 来写, https://codesandbox.io/s/vue-antd-template-128gi?file=/src/App.vue 又可以正常展示出来

@sendya
Copy link
Member

sendya commented Jul 23, 2020

image

你提供的 demo 没复现你描述的问题

@luichooy
Copy link
Author

luichooy commented Jul 23, 2020

@sendya
我的本地配置比较复杂,demo 环境没办法复现,但我相关的代码是这样写的。我在想是否是跟本地环境有关呢? tsx 开发环境导致的问题?

本地跑出来是这样的:

123

@github-actions
Copy link

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 19, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants