Fix wtforms validatoion of package name

This commit is contained in:
rubenwardy
2020-01-24 18:03:40 +00:00
parent ddf5c7f665
commit 53a63367dc
3 changed files with 3 additions and 2 deletions

View File

@@ -50,7 +50,7 @@
{% if package and package.approved and not package.checkPerm(current_user, "CHANGE_NAME") %}
{{ render_field(form.name, class_="pkg_meta col-sm-3", readonly=True) }}
{% else %}
{{ render_field(form.name, class_="pkg_meta col-sm-3") }}
{{ render_field(form.name, class_="pkg_meta col-sm-3", pattern="[a-z0-9_]+", title=_("Lower case letters (a-z), digits (0-9), and underscores (_) only")) }}
{% endif %}
</div>
{{ render_field(form.short_desc, class_="pkg_meta") }}