mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-29 12:58:31 -04:00
Don’t allow adding unknown domains to branding lookup
We should make sure we’re not putting typos in the branding list. We can validate what gets entered here against our known list of public-sector domains.
This commit is contained in:
@@ -35,6 +35,7 @@ from app.main.validators import (
|
||||
Blacklist,
|
||||
CsvFileValidator,
|
||||
DoesNotStartWithDoubleZero,
|
||||
KnownGovernmentDomain,
|
||||
LettersNumbersAndFullStopsOnly,
|
||||
NoCommasInPlaceHolders,
|
||||
OnlyGSMCharacters,
|
||||
@@ -722,7 +723,7 @@ class ServicePreviewBranding(StripWhitespaceForm):
|
||||
class ServiceUpdateEmailBranding(StripWhitespaceForm):
|
||||
name = StringField('Name of brand')
|
||||
text = StringField('Text')
|
||||
domain = StringField('Domain')
|
||||
domain = StringField('Domain', validators=[KnownGovernmentDomain()])
|
||||
colour = StringField(
|
||||
'Colour',
|
||||
validators=[
|
||||
|
||||
Reference in New Issue
Block a user