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 表单] 动态字段校验不生效 #3203

Closed
yanghuanrong opened this issue Jun 16, 2024 · 1 comment
Closed

[Form 表单] 动态字段校验不生效 #3203

yanghuanrong opened this issue Jun 16, 2024 · 1 comment

Comments

@yanghuanrong
Copy link

tdesign-vue 版本

1.9.4-naruto

重现链接

No response

重现步骤

当组件字段的 key 为动态的时候,执行validate校验,即使没有填写值,也总是校验为 true ,这是一个错误的行为

 <t-form :data="configData" ref="config" label-width="140px" >
   <t-form-item
      v-for="(item) in productConfig"
      :key="item.name"
      :label="item.cname"
      :name="'config.' + item.name"
      :help="'案例:'+ item.demo"
      :rules="[{ required: true, message: '此项必填' }]"
    >
      <t-input v-model="formData.config[item.name]"></t-input>
    </t-form-item>
  </t-form>

期望结果

期望表单字段动态的时候,可以与静态字段的表单校验效果一致

实际结果

No response

框架版本

Vue(2.7x)

浏览器版本

No response

系统版本

No response

Node版本

20.11.1

补充说明

No response

Copy link
Contributor

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

@yanghuanrong yanghuanrong changed the title [组件名称] 描述问题的标题 [Form 表单] 动态字段校验不生效 Jun 16, 2024
@yanghuanrong yanghuanrong closed this as not planned Won't fix, can't repro, duplicate, stale Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant