aboutsummaryrefslogtreecommitdiff
path: root/app/blueprints
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2020-01-24 18:03:40 +0000
committerrubenwardy <rw@rubenwardy.com>2020-01-24 18:03:40 +0000
commit53a63367dc7defc34616fc784cd19086d60ad54f (patch)
tree4726fe4258809a4d001438dc32c11d2de4809b8b /app/blueprints
parentddf5c7f665f592f7233afb6e9ee8a1ef9db7aea1 (diff)
downloadcheatdb-53a63367dc7defc34616fc784cd19086d60ad54f.tar.xz
Fix wtforms validatoion of package name
Diffstat (limited to 'app/blueprints')
-rw-r--r--app/blueprints/packages/packages.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/blueprints/packages/packages.py b/app/blueprints/packages/packages.py
index 600a208..6ae6d5a 100644
--- a/app/blueprints/packages/packages.py
+++ b/app/blueprints/packages/packages.py
@@ -173,7 +173,7 @@ def download(package):
class PackageForm(FlaskForm):
- name = StringField("Name (Technical)", [InputRequired(), Length(1, 20), Regexp("^[a-z0-9_]", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")])
+ name = StringField("Name (Technical)", [InputRequired(), Length(1, 20), Regexp("^[a-z0-9_]+$", 0, "Lower case letters (a-z), digits (0-9), and underscores (_) only")])
title = StringField("Title (Human-readable)", [InputRequired(), Length(3, 50)])
short_desc = StringField("Short Description (Plaintext)", [InputRequired(), Length(1,200)])
desc = TextAreaField("Long Description (Markdown)", [Optional(), Length(0,10000)])