Emails without top level domain can't be submitted during registration
1 unresolved thread
Compare changes
Files
2- Divyam Tayal authored
+ 2
− 3
@@ -140,11 +140,10 @@ module PathRegex
@@ -140,11 +140,10 @@ 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.
DOMAIN = '([a-zA-Z0-9]+([a-zA-Z0-9\-][a-zA-Z0-9]+)*\.)+' # Domain or subdomains must not start or finish with hyphen