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

fix: Form.Item with help should display error style when validate failed #25582

Merged
merged 3 commits into from Jul 13, 2020

Conversation

zhangchen915
Copy link
Contributor

@zhangchen915 zhangchen915 commented Jul 11, 2020

🤔 This is a ...

  • New feature
  • Bug fix
  • Site / documentation update
  • Demo update
  • Component style update
  • TypeScript definition update
  • Bundle size optimization
  • Performance optimization
  • Refactoring
  • Code style optimization
  • Test Case
  • Branch merge
  • Other (about what?)

🔗 Related issue link

close #25560

💡 Background and solution

📝 Changelog

Language Changelog
🇺🇸 English Fix Form.Item help style when verification fails
🇨🇳 Chinese 修复 Form.Item help 在校验失败时的样式

☑️ Self Check before Merge

⚠️ Please check all items below before review. ⚠️

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jul 11, 2020

@ant-design-bot
Copy link
Contributor

ant-design-bot commented Jul 11, 2020

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 11, 2020

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit a27a522:

Sandbox Source
antd reproduction template Configuration

Copy link
Member

@fireairforce fireairforce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@xrkffgg xrkffgg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR里的 changelog 填写一下

}
if (validateStatus !== undefined) mergedValidateStatus = validateStatus;
else if (meta?.validating) mergedValidateStatus = 'validating';
else if (meta?.errors?.length) mergedValidateStatus = 'error';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

mergedErrors ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Form.Item with help
mergedErrors = toArray(help);

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should keep { }.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@crazyair
Copy link
Member

不知道是不是这个修改导致了现在的问题

image

https://codesandbox.io/s/strange-babbage-hkq1n?file=/index.js

@zombieJ
Copy link
Member

zombieJ commented Jul 24, 2020

嗯,修过了 #25737

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Form.Item does not display validation message when set help
7 participants