mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-07-31 11:49:58 -04:00
Merge pull request #2294 from alphagov/no-canonical-magic
Validate non canonical domains
This commit is contained in:
@@ -33,6 +33,7 @@ from wtforms.validators import URL, DataRequired, Length, Optional, Regexp
|
||||
|
||||
from app.main.validators import (
|
||||
Blacklist,
|
||||
CanonicalGovernmentDomain,
|
||||
CsvFileValidator,
|
||||
DoesNotStartWithDoubleZero,
|
||||
KnownGovernmentDomain,
|
||||
@@ -721,7 +722,10 @@ class ServicePreviewBranding(StripWhitespaceForm):
|
||||
|
||||
|
||||
class GovernmentDomainField(StringField):
|
||||
validators = [KnownGovernmentDomain()]
|
||||
validators = [
|
||||
KnownGovernmentDomain(),
|
||||
CanonicalGovernmentDomain(),
|
||||
]
|
||||
|
||||
def post_validate(self, form, validation_stopped):
|
||||
if self.data and not self.errors:
|
||||
|
||||
Reference in New Issue
Block a user