Skip to content
Snippets Groups Projects
Commit 180f2ae6 authored by Divyam Tayal's avatar Divyam Tayal
Browse files

Changing LOCAL_PART to more lenient.

parent 2deaf54f
No related branches found
No related tags found
No related merge requests found
......@@ -140,8 +140,7 @@ module PathRegex
FULL_NAMESPACE_FORMAT_REGEX = %r{(#{NAMESPACE_FORMAT_REGEX}/){,#{Namespace::NUMBER_OF_ANCESTORS_ALLOWED}}#{NAMESPACE_FORMAT_REGEX}}
# The email pattern should be compilable to a Regex with the option v. Hence the - character must be quoted.
LOCAL_PART_1 = '[a-zA-Z0-9]+' # First character must be a-z, A-Z or a number. We don't allow quoted emails.
LOCAL_PART_2 = '([._%+\-]\w+)*' # The characters ._%+- cannot be consecutive, they must be followed by an alphanumeric character.
LOCAL_PART = '[^@]+' # Any character except @.
DOMAIN = '([a-zA-Z0-9]+([a-zA-Z0-9\-][a-zA-Z0-9]+)*\.)+' # Domain or subdomains must not start or finish with hyphen
TLD = '[a-zA-Z]{2,}' # TLD
EMAIL_FORMAT_JS = LOCAL_PART_1 + LOCAL_PART_2 + '@' + DOMAIN + TLD
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment