Skip to content

allow upper case letters in domain part of emails and fix local part … - #23

Open
tflori wants to merge 1 commit into
masterfrom
email-regex
Open

allow upper case letters in domain part of emails and fix local part …#23
tflori wants to merge 1 commit into
masterfrom
email-regex

Conversation

@tflori

@tflori tflori commented Apr 2, 2024

Copy link
Copy Markdown
Owner

…reg ex

This change also proves the domain part in more detail. Such as consecutive dashes or dots are not allowed.

…reg ex

This change also proves the domain part in more detail. Such as consecutive dashes or dots are not allowed.
{
const LOCAL_PART_PATTERN = '[A-Za-z0-9.!#$%&\'*+-\/=?^_`{|}~.]+';
const DOMAIN_PART_PATTERN = '(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])';
const LOCAL_PART_PATTERN = '[A-Za-z0-9.!#$%&\'*+\/=?^_`{|}~.]+-';

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there is an error in your regex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant