More concise alias name validation error message and help text.

This commit is contained in:
NOYB 2023-01-31 23:35:26 -08:00 committed by Franco Fichtner
parent 05cc292031
commit f4ea699d5b
2 changed files with 2 additions and 2 deletions

View File

@ -83,7 +83,7 @@ class AliasNameField extends BaseField
),
'domain' => $reservedwords));
$validators[] = new Regex([
'message' => gettext('The name must start with a letter or single underscore, be less than 32 characters long and may further only consist alphanumeric characters or underscores.'),
'message' => gettext('The name must start with a letter or single underscore, be less than 32 characters and only consist of alphanumeric characters or underscores.'),
/* avoids single "_" and prefixes of "__" here too */
'pattern' => '/^([a-zA-Z]|([_a-zA-Z][a-zA-Z0-9][_a-zA-Z0-9]{0,29}))$/'
]);

View File

@ -708,7 +708,7 @@
<input type="text" class="form-control" size="50" id="alias.name">
<div class="hidden" data-for="help_for_alias.name">
<small>
{{lang._('The name of the alias must start with a letter or single underscore, be less than 32 characters long and may further only consist alphanumeric characters or underscores. Aliases can be nested using this name.')}}
{{lang._('The name must start with a letter or single underscore, be less than 32 characters and only consist of alphanumeric characters or underscores. Aliases can be nested using this name.')}}
</small>
</div>
</td>