Skip to content

Commit bab31e0

Browse files
committed
optimize email regex (credits: @kevinbackhouse, fix: #372)
1 parent e1ab7e3 commit bab31e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flask_restx/inputs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def my_type(value):
4848

4949

5050
email_regex = re.compile(
51-
r"^" "(?P<local>[^@]*[^@.])" r"@" r"(?P<server>[^@]+(?:\.[^@]+)*)" r"$",
51+
r"^" "(?P<local>[^@]*[^@.])" r"@" r"(?P<server>[^@\.]+(?:\.[^@\.]+)*)" r"$",
5252
re.IGNORECASE,
5353
)
5454

0 commit comments

Comments
 (0)