make sure alias pattern check is the same everywhere: Only letter, number, dash (-), underscore (_) can be used in alias prefix

This commit is contained in:
Son NK 2019-12-09 18:19:42 +01:00
parent 260b235328
commit 74fe984ae1
2 changed files with 6 additions and 5 deletions

View file

@ -24,8 +24,9 @@
<div class="row mt-4">
<div class="col pr-1">
<input name="email-prefix" class="form-control" pattern="[0-9|A-Z|a-z|-]{1,}"
title="Only letter, number or dash can be used."
<input name="email-prefix" class="form-control"
pattern="[0-9|A-Z|a-z|-|_]{1,}"
title="Only letter, number, dash (-), underscore (_) can be used in alias prefix."
placeholder="alias prefix"
autofocus required>
</div>

View file

@ -94,8 +94,8 @@
<div class="mt-2">OR</div>
<div style="display: flex; align-items: center" class="mt-2">
<input class="form-control"
pattern="[0-9|A-Z|a-z|-]{3,}"
title="Only letter, number or dash can be used and alias must have at least 3 characters."
pattern="[0-9|A-Z|a-z|-|_]{1,}"
title="Only letter, number, dash (-), underscore (_) can be used in alias prefix."
style="flex-grow: 2" name="custom-email-prefix">
<input type="hidden" name="email-suffix" value="{{ email_suffix }}">
<div class="ml-2">
@ -103,7 +103,7 @@
</div>
</div>
<small class="text-muted">
Alias can use letter, number, dash and must be at least 3 characters
Alias can use letter, number, dash and cannot be empty
</small>
{% endif %}
</div>