Skip to content

通过useForm产生的validate函数无法校验同步产生的表单数据 #6564

@yr-96

Description

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

Version

3.2.5

Environment

win11, chrome@113.0.5672.93, vue@3.2.36

Reproduction link

Edit on CodeSandbox

Steps to reproduce

点击提交按钮,控制台显示一次校验失败信息,当第二次点击按钮时才会执行校验成功的回调

What is expected?

第一次点击的时候就校验通过

What is actually happening?

第一次校验失败,第二次校验才成功


以const { validate, validateInfos } = Form.useForm(model, rule);为例,
实际开发中可能出现model中的数据(如name)需要校验,但是值并非直接绑定在表单组件中
而是例如从一个name的select中获取到数组再拼接成字符串的

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions