diff options
author | 2020-08-04 11:29:26 +0200 | |
---|---|---|
committer | 2020-08-04 11:29:26 +0200 | |
commit | b7f302e4e7afefb16a652d3b0524f4cf4ee835e9 (patch) | |
tree | 84cdc53e92406c49fac4e8da4dd38f2d85e9156f /pydis_site/apps | |
parent | Add a validator for package names. (diff) |
Add ascii digits to the validator.
Some packages can contain them and are good for stats.
Diffstat (limited to 'pydis_site/apps')
-rw-r--r-- | pydis_site/apps/api/models/bot/documentation_link.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pydis_site/apps/api/models/bot/documentation_link.py b/pydis_site/apps/api/models/bot/documentation_link.py index f77d6f38..e093af59 100644 --- a/pydis_site/apps/api/models/bot/documentation_link.py +++ b/pydis_site/apps/api/models/bot/documentation_link.py @@ -12,8 +12,8 @@ class DocumentationLink(ModelReprMixin, models.Model): max_length=50, validators=( RegexValidator( - regex=r"^[a-z_]+$", - message="Package names can only consist of lowercase a-z letters and underscores." + regex=r"^[a-z0-9_]+$", + message="Package names can only consist of lowercase a-z letters, digits, and underscores." ), ), help_text="The Python package name that this documentation link belongs to." |