Skip to content
Snippets Groups Projects

Display bolder warning if email TLD is missing

Merged Eduardo Sanz García requested to merge eduardosanz/email-tld-warning into master
All threads resolved!
  • 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 (closed)

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

Edited by Eduardo Sanz García

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • changed milestone to %17.7

  • added 1 commit

    • 3f47d9aa - Apply simplification of regex

    Compare with previous version

  • Eduardo Sanz García reset approvals from @sgarg_gitlab by pushing to the branch

    reset approvals from @sgarg_gitlab by pushing to the branch

  • added 1 commit

    • c9bf661a - Code simplification and more specific warning

    Compare with previous version

  • requested review from @sgarg_gitlab

  • Fernando Cardenas
  • Fernando Cardenas approved this merge request

    approved this merge request

  • Smriti Garg approved this merge request

    approved this merge request

  • Smriti Garg resolved all threads

    resolved all threads

  • Eduardo Sanz García enabled automatic add to merge train when checks pass

    enabled automatic add to merge train when checks pass

  • Eduardo Sanz García added this merge request to the merge train at position 2

    added this merge request to the merge train at position 2

  • mentioned in commit e452b894

  • added workflowstaging label and removed workflowcanary label

  • Please register or sign in to reply
    Loading