Updated the contact us link for non gov.uk domains trying to register.

This commit is contained in:
Pete Herlihy
2016-04-22 15:58:17 +01:00
committed by Chris Hill-Scott
parent b8774a8ce9
commit 636facb71c

View File

@@ -31,8 +31,7 @@ class ValidEmailDomainRegex(object):
message = (
'Enter a central government email address.'
' If you think you should have access'
' <a href="{}">contact us</a>').format(
"https://docs.google.com/forms/d/1AL8U-xJX_HAFEiQiJszGQw0PcEaEUnYATSntEghNDGo/viewform")
' <a href="{}">contact us</a>').format(url_for('main.feedback'))
valid_domains = current_app.config.get('EMAIL_DOMAIN_REGEXES', [])
email_regex = "[^\@^\s]+@([^@^\\.^\\s]+\.)*({})$".format("|".join(valid_domains))
if not re.match(email_regex, field.data.lower()):