Skip to content

Display bolder warning if email TLD is missing

Eduardo Sanz García requested to merge eduardosanz/email-tld-warning into master
  • Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you can request access to GitLab Duo.

What does this MR do and why?

In the registration page, display a warning, This email address does not look right, are you sure you typed it correctly?, in red color when the email address doesn't have a valid top-level-domain (TLD):

  • missing a@b, or
  • less than two characters a@b.c

The form can be submitted with the warning.

No changes in the rest of other invalid emails:

Invalid email Same behaviour before and after Reason
"A"@b.co Please provide a valid email address quoted emails
ab.co Please provide a valid email address no @ symbol
a@b@c.co Please provide a valid email address several @ symbol
a@-b.co Please provide a valid email address domain starting with hyphen
a@b-.co Please provide a valid email address domain finishing with hyphen
a@example_me.co Please provide a valid email address domain with underscore
a@[123.123.123.123] Please provide a valid email address IP addresses

Closes #499244

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
image image
image image

How to set up and validate locally

  1. Go to either:
  • /users/sign_up or
  • /-/trial_registrations/new (SAAS enabled)
  1. Check the email field in the registration

Related to #499244

Edited by Eduardo Sanz García

Merge request reports

Loading