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
paradite opened this issue Feb 19, 2019 · 0 comments

Comments

Projects
None yet
2 participants
@paradite
Copy link

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

🐛 should not print warning for not generating help and validateStatus…
… automatically when help or validateStatus is specified

close #14911

@afc163 afc163 referenced this issue Feb 22, 2019

Merged

Fix FormItem warning message #15000

5 of 13 tasks complete

afc163 added a commit that referenced this issue Feb 23, 2019

🐛 should not print warning for not generating help and validateStatus…
… automatically when help or validateStatus is specified

close #14911

@afc163 afc163 referenced this issue Feb 23, 2019

Merged

✨ 3.13.6 #15018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.