-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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: allow single quotes in default email validator #2717
Conversation
WalkthroughThe recent changes focus on enhancing input validation for email addresses by allowing apostrophes in the local part, aligning with official specifications. Additionally, the update includes tests for validating email and URL inputs against various formats, ensuring that the validation logic accurately identifies valid and invalid inputs according to defined standards. Changes
Assessment against linked issues
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files selected for processing (2)
- cypress/e2e/inputs.cy.js (1 hunks)
- src/utils/defaultInputValidators.js (1 hunks)
Additional comments: 3
src/utils/defaultInputValidators.js (1)
- 8-8: The updated regex for the email validator correctly includes an apostrophe (
'
) in the local part of the email address, aligning with RFC 5322 standards. This change ensures that email addresses like "o'[email protected]" are now considered valid. Good job on updating the regex to be more inclusive of valid email address characters.cypress/e2e/inputs.cy.js (2)
- 588-607: The addition of tests for the default email validator, including cases with apostrophes in the email address, is a great way to ensure the recent changes to the email validation logic are correctly implemented. These tests cover both valid and invalid email formats, which is essential for maintaining the reliability of the email validator. It's good practice to include such comprehensive tests whenever validation logic is updated.
- 608-625: The new tests for the default URL validator, covering various valid and invalid URL formats, are well-implemented. These tests ensure that the URL validation logic is robust and can accurately distinguish between valid and invalid URLs. Including tests for different URL schemes and special cases like "localhost" domains is a good practice for ensuring comprehensive validation coverage.
## [11.10.6](v11.10.5...v11.10.6) (2024-03-05) ### Bug Fixes * allow single quotes in default email validator ([#2717](#2717)) ([e4b7a3a](e4b7a3a))
🎉 This PR is included in version 11.10.6 🎉 The release is available on: Your semantic-release bot 📦🚀 |
fixes #2715
Summary by CodeRabbit