Enhanced email pattern#2012
Enhanced email pattern#2012SumithThota wants to merge 3 commits intoServiceNowDevProgram:mainfrom SumithThota:enhanced-email-pattern
Conversation
Updated with Comprehensive email regex pattern
Added a comprehensive regex pattern for email validation.
|
Thank you for your contribution. However, it doesn’t comply with our contributing guidelines. As a reminder, the general requirements (as outlined in the CONTRIBUTING.md file) are the following: follow the folder+subfolder+snippetfolder guidelines and include a readme.md file explaining what the code snippet does. Review your contribution against the guidelines and make the necessary adjustments. Closing this for now. Once you make additional changes, feel free to re-open this Pull Request or create a new one. |
|
@SumithThota - Apologies for the closure of this item, as it was erroneous. This is an update to an existing snippet which had a related README.md - do consider recreating or undeleting this branch, as this would be a valid contribution. I have marked this as hacktoberfest-accepted in the interim. |
|
Hi @SapphicFire I have recreated a new pull request #2052, please do check it and add hacktoberfest-accepted label to it |
PR Description:
Fixes Issue : #1997
Enhanced Email Validation Regex in Client Script.
The existing email regex pattern:
^[^\s@]+@[^\s@]+\.[^\s@]+$used in the source fails to handle several edge cases and may incorrectly validate or reject certain legitimate email formats, such as:Proposal
Update the email regex pattern to:
^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$This pattern handles:
Pull Request Checklist
Overview
Code Quality
Repository Structure Compliance
Core ServiceNow APIs/Server-Side Components/Client-Side Components/Modern Development/Integration/Specialized Areas/Documentation
Restrictions