Change email validation regex to use Devise email regex
What does this MR do and why?
Change email validation regex to use the Devise email regex, which is used to validate email addresses on the backend.
Before this MR, email addresses with a plus sign were rejected. Now they are not anymore.
Issue: https://gitlab.com/gitlab-org/modelops/anti-abuse/team-tasks/-/issues/413
Screenshots or screen recordings
Before | After |
---|---|
![]() |
![]() |
How to set up and validate locally
- Enable the feature flag in Rails console
Feature.enable(:require_email_verification)
- Sign out
- Sign in 3 times with a wrong password
- Sign in with your correct password
- Click
Update email
- Verify an email address with a plus-sign in it (eg.
abuijs+test@gitlab.com
) is not rejected anymore
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Alex Buijs