From 82c7c7f3c091380e5d0dd33723f34b980d037019 Mon Sep 17 00:00:00 2001 From: Stephen Finucane Date: Sat, 19 Nov 2016 18:38:55 +0000 Subject: [PATCH] forms: Tighten validation on BundleForm The 'name' field of 'Bundle' cannot be blank, so update the form to reflect this. Signed-off-by: Stephen Finucane --- patchwork/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patchwork/forms.py b/patchwork/forms.py index 702779ed..54bb02a5 100644 --- a/patchwork/forms.py +++ b/patchwork/forms.py @@ -65,7 +65,7 @@ class LoginForm(forms.Form): class BundleForm(forms.ModelForm): name = forms.RegexField( - regex=r'^[^/]+$', max_length=50, label=u'Name', + regex=r'^[^/]+$', min_length=1, max_length=50, label=u'Name', error_messages={'invalid': 'Bundle names can\'t contain slashes'}) class Meta: -- 2.47.3