-
Notifications
You must be signed in to change notification settings - Fork 913
Closed
Description
Problem :
I found that the email regex pattern ^[^\s@]+@[^\s@]+\.[^\s@]+$ at Source
will fails to handle several edge cases and may incorrectly validate or reject certain legitimate email formats.
Propsal :
pattern: ^(([^<>()\[\]\\.,;:\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 more effectively handles:
- Quoted local parts
- Dots within the local segment
- IP-based domains
- Complex but valid email formats
Goal
Enhance the email validation logic to ensure broader compatibility with real-world email formats and align with standard validation practices.
Assign to Me
I would like to work on this issue.
Kindly assign this issue to me so that I can proceed with implementing and testing the improved regex validation.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels