From patchwork Fri Mar 25 13:40:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Finucane X-Patchwork-Id: 601987 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3qWkvx4FDWz9s9Z for ; Sat, 26 Mar 2016 00:40:45 +1100 (AEDT) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id 3qWkvx3QggzDqDp for ; Sat, 26 Mar 2016 00:40:45 +1100 (AEDT) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by lists.ozlabs.org (Postfix) with ESMTP id 3qWkvs5bNkzDq5k for ; Sat, 26 Mar 2016 00:40:41 +1100 (AEDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP; 25 Mar 2016 06:40:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,391,1455004800"; d="scan'208";a="675521014" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 25 Mar 2016 06:40:40 -0700 Received: from sivswdev01.ir.intel.com (sivswdev01.ir.intel.com [10.237.217.45]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id u2PDed9N025855; Fri, 25 Mar 2016 13:40:39 GMT Received: from sivswdev01.ir.intel.com (localhost [127.0.0.1]) by sivswdev01.ir.intel.com with ESMTP id u2PDecRA026198; Fri, 25 Mar 2016 13:40:38 GMT Received: (from sfinucan@localhost) by sivswdev01.ir.intel.com with id u2PDecLU026194; Fri, 25 Mar 2016 13:40:38 GMT From: Stephen Finucane To: patchwork@lists.ozlabs.org Subject: [PATCH] forms: Tighten validation on BundleForm Date: Fri, 25 Mar 2016 13:40:35 +0000 Message-Id: <1458913235-26154-1-git-send-email-stephen.finucane@intel.com> X-Mailer: git-send-email 2.0.0 X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" 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 628761b..41766c3 100644 --- a/patchwork/forms.py +++ b/patchwork/forms.py @@ -63,7 +63,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: