mirror of
https://github.com/simple-login/app.git
synced 2025-02-23 23:34:05 +08:00
support dot in alias prefix
This commit is contained in:
parent
e74dbd7e98
commit
ceacf8e3a7
5 changed files with 9 additions and 12 deletions
|
@ -221,8 +221,8 @@ def nb_email_log_for_mailbox(mailbox: Mailbox):
|
|||
)
|
||||
|
||||
|
||||
# Only lowercase letters, numbers, dashes (-) and underscores (_) are currently supported
|
||||
_ALIAS_PREFIX_PATTERN = r"[0-9a-z-_]{1,}"
|
||||
# Only lowercase letters, numbers, dots (.), dashes (-) and underscores (_) are currently supported
|
||||
_ALIAS_PREFIX_PATTERN = r"[0-9a-z-_.]{1,}"
|
||||
|
||||
|
||||
def check_alias_prefix(alias_prefix) -> bool:
|
||||
|
|
|
@ -31,15 +31,12 @@
|
|||
<input name="prefix" class="form-control"
|
||||
id="prefix"
|
||||
type="text"
|
||||
pattern="[0-9a-z-_]{1,}"
|
||||
pattern="[0-9a-z-_.]{1,}"
|
||||
maxlength="40"
|
||||
title="Only lowercase letters, numbers, dashes (-) and underscores (_) are currently supported."
|
||||
placeholder="Email alias, for example newsletter-123_xyz"
|
||||
title="Only lowercase letters, dots, numbers, dashes (-) and underscores (_) are currently supported."
|
||||
placeholder="Alias prefix, for example newsletter.com-123_xyz"
|
||||
autofocus required>
|
||||
<div class="small-text">
|
||||
Only lowercase letters, numbers, dashes (-) and underscores (_) are currently supported.
|
||||
Cannot be more than 40 letters.
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
|
|
@ -124,7 +124,7 @@ def custom_alias():
|
|||
|
||||
if not check_alias_prefix(alias_prefix):
|
||||
flash(
|
||||
"Only lowercase letters, numbers, dashes (-) and underscores (_) "
|
||||
"Only lowercase letters, numbers, dashes (-), dots (.) and underscores (_) "
|
||||
"are currently supported for alias prefix. Cannot be more than 40 letters",
|
||||
"error",
|
||||
)
|
||||
|
|
|
@ -103,7 +103,7 @@
|
|||
type="text"
|
||||
pattern="[0-9a-z-_]{1,}"
|
||||
maxlength="40"
|
||||
title="Only lowercase letters, numbers, dashes (-) and underscores (_) are currently supported."
|
||||
title="Only lowercase letters, dots, numbers, dashes (-) and underscores (_) are currently supported."
|
||||
placeholder="email alias"
|
||||
autofocus>
|
||||
</div>
|
||||
|
|
|
@ -157,7 +157,7 @@ def authorize():
|
|||
|
||||
if not check_alias_prefix(alias_prefix):
|
||||
flash(
|
||||
"Only lowercase letters, numbers, dashes (-) and underscores (_) "
|
||||
"Only lowercase letters, numbers, dashes (-), dots (.) and underscores (_) "
|
||||
"are currently supported for alias prefix. Cannot be more than 40 letters",
|
||||
"error",
|
||||
)
|
||||
|
|
Loading…
Reference in a new issue