feat(Form): support tel type validator#56533
Conversation
|
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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! This pull request introduces enhanced form validation capabilities by adding support for a 'tel' (telephone number) validation type. This new feature is enabled by upgrading the underlying 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
|
👁 Visual Regression Report for PR #56533 Failed ❌
Important There are 1 diffs found in this PR: 🔄
|
There was a problem hiding this comment.
Code Review
This pull request adds support for the tel type validator in forms by updating a dependency and the corresponding documentation. The changes are a good addition. I've left one comment with suggestions to make the feature more complete by adding a demo, locale messages, and a changelog entry.
| | required | Required field | boolean | | | ||
| | transform | Transform value to the rule before validation | (value) => any | | | ||
| | type | Normally `string` \|`number` \|`boolean` \|`url` \| `email`. More type to ref [here](https://github.com/react-component/async-validator#type) | string | | | ||
| | type | Normally `string` \|`number` \|`boolean` \|`url` \| `email` \| `tel`. More type to ref [here](https://github.com/react-component/async-validator#type) | string | | |
There was a problem hiding this comment.
Thanks for adding support for the tel validator! To make this feature complete and improve the developer experience, could you please also:
- Add a demo: A working example would be very helpful. You could update the
phonefield incomponents/form/demo/register.tsxto use{ type: 'tel' }in its validation rules. - Add locale messages: The default validation message for the
teltype should be added to the locale files (components/locale/en_US.tsandzh_CN.ts) for consistency. - Fill out the changelog: Please add an entry for this new feature in the changelog section of the PR description.
These additions will make the new feature much easier for developers to discover and use.
More templates
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature #56533 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 807 807
Lines 14867 14867
Branches 3935 3935
=========================================
Hits 14867 14867 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Bundle ReportChanges will increase total bundle size by 432 bytes (0.01%) ⬆️. This is within the configured threshold ✅ Detailed changes
Affected Assets, Files, and Routes:view changes for bundle: antd.min-array-pushAssets Changed:
|




中文版模板 / Chinese template
🤔 This is a ...
🔗 Related Issues
💡 Background and Solution
📝 Change Log