mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-30 10:07:14 +02:00
Minor fixes to email regexp
This commit is contained in:
@ -32,7 +32,7 @@ def validate_username(value, field="username"):
|
|||||||
|
|
||||||
def validate_email(value):
|
def validate_email(value):
|
||||||
value = str(value).strip()
|
value = str(value).strip()
|
||||||
if not re.match(r"^[a-z\d_.+-]+@[a-z\d\-]+\.[a-z\d\-.]+$", value, flags=re.I):
|
if not re.match(r"^[a-z\d_\.\+\-]+@[a-z\d\-]+\.[a-z\d\-\.]+$", value, flags=re.I):
|
||||||
raise click.BadParameter("Invalid email address")
|
raise click.BadParameter("Invalid email address")
|
||||||
return value
|
return value
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user