From 514a98f946b733fe782201fcfd610f32fd806d56 Mon Sep 17 00:00:00 2001 From: Chris Hill-Scott Date: Wed, 7 Nov 2018 10:49:04 +0000 Subject: [PATCH] Make hex colour code error more helpful I just got stuck for like a whole minute on this. --- app/main/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main/forms.py b/app/main/forms.py index 643fdcd31..25bd198c5 100644 --- a/app/main/forms.py +++ b/app/main/forms.py @@ -752,7 +752,7 @@ class ServiceUpdateEmailBranding(StripWhitespaceForm): colour = StringField( 'Colour', validators=[ - Regexp(regex="^$|^#(?:[0-9a-fA-F]{3}){1,2}$", message='Must be a valid color hex code') + Regexp(regex="^$|^#(?:[0-9a-fA-F]{3}){1,2}$", message='Must be a valid color hex code (starting with #)') ] ) file = FileField_wtf('Upload a PNG logo', validators=[FileAllowed(['png'], 'PNG Images only!')])