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.List rules disables deeply nested Form.Item rules #30928

Open
1 task done
5argon opened this issue Jun 9, 2021 · 0 comments
Open
1 task done

Form.List rules disables deeply nested Form.Item rules #30928

5argon opened this issue Jun 9, 2021 · 0 comments
Labels

Comments

@5argon
Copy link

5argon commented Jun 9, 2021

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

Reproduction link

Edit on CodeSandbox

Steps to reproduce

  • First press Submit and see that "No Letter A" and "No Letter Z" boxes are validated. Console outputs 4 errors from 2 "No Letter Z" from different list items, and 2 "No Letter A" from the same list item but on different deeper nested page.
  • Enable the switch up top to add rules to the outer Form.List.
  • Press Submit again and this time "No Letter A" rules are not activated. Console output 3 errors (4 + 1 - 2) instead of expected 5 errors. (4 + 1)

What is expected?

Expected the state after switch on the Form.List rules to add one more rule to count list items, console should output 5 errors.

What is actually happening?

Instead this rule also disables deeply nested Form.Item rules, "No Letter A" rule is no longer active. Console only outputs 3 errors.

Environment Info
antd 4.16.2
React 17.0.2
System MacOS
Browser Edge
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant