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

Warning still shows up in console when validateStatus and help are set on Form.Item manually #14911

Closed
1 task done
paradite opened this issue Feb 19, 2019 · 0 comments
Closed
1 task done
Assignees

Comments

@paradite
Copy link

@paradite paradite commented Feb 19, 2019

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

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Open the link
Observe that error is printed in the console:

Warning: Form.Item cannot generate validateStatus and help automatically, while there are more than one getFieldDecorator in it.

What is expected?

No error message should be printed in the console, or there should be an option to suppress the error message, because these fields are already set manually and there is no need to set them automatically. This is documented in "Customized Validation" as a feature: https://ant.design/components/form/#components-form-demo-validate-static

What is actually happening?

Error message "Warning: Form.Item cannot generate validateStatus and help automatically, while there are more than one getFieldDecorator in it." is shown in the console.

Environment Info
antd 3.13.4
React 16.8.2
System All
Browser All

source code that prints the error message:

this.getControls(this.props.children, true).length <= 1,

I know this issue was raised in #5052, but in my case, I have set these fields properly instead of not defining them, so the warning message is not necessary.

afc163 added a commit that referenced this issue Feb 22, 2019
… automatically when help or validateStatus is specified

close #14911
afc163 added a commit that referenced this issue Feb 23, 2019
… automatically when help or validateStatus is specified

close #14911
@afc163 afc163 mentioned this issue Feb 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants