calibre: explain correct name format for new library

Closes: #2186.

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
[jvalleroy: Remove duplicate import]
[jvalleroy: Reword help text slightly]
Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Benedek Nagy 2022-03-20 20:47:02 +00:00 committed by James Valleroy
parent c9bf209c2e
commit 4ac789efd3
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -16,6 +16,9 @@ class CreateLibraryForm(forms.Form):
name = forms.CharField(
label=_('Name of the new library'), strip=True,
help_text=_('Only letters of the English alphabet and numbers, '
'without spaces or special characters. Example: '
'My_Library_2000'),
validators=[validators.RegexValidator(r'^[A-Za-z0-9_.-]+$')])
def clean_name(self):