-
-
Notifications
You must be signed in to change notification settings - Fork 49.8k
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
Conversation
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:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR里的 changelog 填写一下
components/form/FormItem.tsx
Outdated
} | ||
if (validateStatus !== undefined) mergedValidateStatus = validateStatus; | ||
else if (meta?.validating) mergedValidateStatus = 'validating'; | ||
else if (meta?.errors?.length) mergedValidateStatus = 'error'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mergedErrors ?
There was a problem hiding this comment.
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);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should keep { }
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
不知道是不是这个修改导致了现在的问题 https://codesandbox.io/s/strange-babbage-hkq1n?file=/index.js |
嗯,修过了 #25737 |
🤔 This is a ...
🔗 Related issue link
close #25560
💡 Background and solution
📝 Changelog
help
style when verification failshelp
在校验失败时的样式☑️ Self Check before Merge