Update the email regex so it accept the '+' sign. Fix https://github.com/YunoHost/issues/issues/1333.

This commit is contained in:
Julien Jershon 2019-10-05 10:29:01 +02:00 committed by ljf
parent c7347ef04f
commit 69e20fa114

View file

@ -100,6 +100,12 @@ user:
-m: -m:
full: --mail full: --mail
help: (Deprecated, see --domain) Main unique email address help: (Deprecated, see --domain) Main unique email address
extra:
ask: ask_email
required: True
pattern: &pattern_email_without_plus
- !!str ^[\w.-]+@([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+([^\W\d_]{2,})$
- "pattern_email_without_plus"
-p: -p:
full: --password full: --password
help: User password help: User password
@ -158,9 +164,7 @@ user:
-m: -m:
full: --mail full: --mail
extra: extra:
pattern: &pattern_email pattern: *pattern_email_without_plus
- !!str ^[\w.-]+@([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+((xn--)?[^\W_]{2,})$
- "pattern_email"
-p: -p:
full: --change-password full: --change-password
help: New password to set help: New password to set
@ -172,7 +176,9 @@ user:
nargs: "*" nargs: "*"
metavar: MAIL metavar: MAIL
extra: extra:
pattern: *pattern_email pattern: &pattern_email
- !!str ^[\w\+.-]+@([^\W_A-Z]+([-]*[^\W_A-Z]+)*\.)+([^\W\d_]{2,})$
- "pattern_email"
--remove-mailforward: --remove-mailforward:
help: Mailforward addresses to remove help: Mailforward addresses to remove
nargs: "*" nargs: "*"
@ -182,7 +188,7 @@ user:
nargs: "*" nargs: "*"
metavar: MAIL metavar: MAIL
extra: extra:
pattern: *pattern_email pattern: *pattern_email_without_plus
--remove-mailalias: --remove-mailalias:
help: Mail aliases to remove help: Mail aliases to remove
nargs: "*" nargs: "*"