Merge pull request #490 from alphagov/contact-link-signup

Updated the contact us link for non gov.uk domains trying to register.
This commit is contained in:
Chris Hill-Scott
2016-04-25 11:38:30 +01:00
2 changed files with 9 additions and 9 deletions

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()):