Skip to content

<FormItem>表单校验的rules总是会以formItem的rules替代form的rules,然而更期望是合并的rules #3596

@hcg1023

Description

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

What problem does this feature solve?

期望在form定义rules之后,在formItem的rules会与form的rules合并,而并非直接使form的rules失效,导致form定义的rules无效

What does the proposed API look like?

form或者formItem可以有一个mergeRules的props,用于将formItem与form的rules合并,而非替换

Link

https://github.com/vueComponent/ant-design-vue/blob/next/components/form/FormItem.tsx#L139

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