-
-
Notifications
You must be signed in to change notification settings - Fork 280
feat: support tel rule #775
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
Conversation
|
@guoyunhe is attempting to deploy a commit to the React Component Team on Vercel. A member of the Team first needs to authorize it. |
Summary of ChangesHello @guoyunhe, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 此拉取请求旨在为表单组件库添加对电话号码 ( Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #775 +/- ##
=======================================
Coverage 99.54% 99.54%
=======================================
Files 19 19
Lines 1311 1311
Branches 329 329
=======================================
Hits 1305 1305
Misses 6 6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Code Review
本次 PR 同步了上游依赖 @rc-component/async-validator 的更新,增加了 tel 类型的校验规则。代码变更清晰地反映了这一目的。
我有以下反馈:
主要问题:
- 缺少测试: 本次变更没有包含对新
tel校验规则的测试。为了确保功能正确并防止未来回归,在tests/validate.test.tsx中添加测试用例是至关重要的。请补充测试,覆盖有效和无效的电话号码场景。
次要建议:
- 代码风格: 为了提高代码的可读性和可维护性,我建议将
interface.ts和utils/messages.ts中新增的属性按字母顺序排列。具体建议请见行级评论。
| tel?: ValidateMessage; | ||
| url?: ValidateMessage; | ||
| hex?: ValidateMessage; |
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.
| tel: typeTemplate, | ||
| url: typeTemplate, | ||
| hex: typeTemplate, |
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.
react-component/async-validator#21
@rc-component/[email protected] 新增了 tel 类型校验,@rc-component/field-form 同步支持