Do not allow slugs to start with a non-alphanumeric character

This commit is contained in:
Raphael Michel
2020-01-23 09:36:53 +01:00
parent bcd687764c
commit deff282a63
2 changed files with 2 additions and 2 deletions

View File

@@ -293,7 +293,7 @@ class Event(EventMixin, LoggedModel):
"This will be used in URLs, order codes, invoice numbers, and bank transfer references."),
validators=[
RegexValidator(
regex="^[a-zA-Z0-9.-]+$",
regex="^[a-zA-Z0-9][a-zA-Z0-9.-]+$",
message=_("The slug may only contain letters, numbers, dots and dashes."),
),
EventSlugBanlistValidator()