mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-08 18:33:12 -04:00
Merge pull request #2460 from alphagov/hex-error-message
Make hex colour code error more helpful
This commit is contained in:
@@ -752,7 +752,7 @@ class ServiceUpdateEmailBranding(StripWhitespaceForm):
|
|||||||
colour = StringField(
|
colour = StringField(
|
||||||
'Colour',
|
'Colour',
|
||||||
validators=[
|
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!')])
|
file = FileField_wtf('Upload a PNG logo', validators=[FileAllowed(['png'], 'PNG Images only!')])
|
||||||
|
|||||||
Reference in New Issue
Block a user