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表单中绑定对象列表只能验证第一个属性 #874

Closed
1 task
LeonSage opened this issue Jun 17, 2019 · 2 comments
Closed
1 task

form表单中绑定对象列表只能验证第一个属性 #874

LeonSage opened this issue Jun 17, 2019 · 2 comments
Labels

Comments

@LeonSage
Copy link

LeonSage commented Jun 17, 2019

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

Version

undefined

Environment

antd version: 最新 OS and its version: OS X Browser and its version: chrome 最新

Reproduction link

https://codepen.io/leonsage/pen/bPpybo

Steps to reproduce

使用自定义的输入框组,每行有两个输入框,都为required: true。
两个输入框绑定的元素为:names[$key].key, names[$key].value。
点击 号,你可以创建一行数据,-号可以删除。
当第一个输入框内容为空,blur时,会有错误提示,但是影响的是全部一行两个输入框。
如果第一个输入框输入了内容,而第二个为空,会发现第二个输入框的 required:true 并没有错误提示。

What is expected?

同一行的两个输入框的判断应该独立,任何一个为空都可以有单独的错误提示。

What is actually happening?

第一个为空,会影响一行。
第二个为空,无法正确的错误提示。

@tangjinzhou
Copy link
Member

https://vue.ant.design/components/form-cn/#Form.Item
image

@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 Jun 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants