diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-09 06:08:53 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-08-09 06:08:53 +0300 |
commit | 251f4007156b40a0585e208eee2847d9d5746e08 (patch) | |
tree | ad7bd847a0807981d678c4b997c0acc614e91d0a /app/assets/javascripts/sessions | |
parent | 4596c2f5a5aef62aee84c24c26d9dc8db538ef3e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/sessions')
-rw-r--r-- | app/assets/javascripts/sessions/new/components/update_email.vue | 4 | ||||
-rw-r--r-- | app/assets/javascripts/sessions/new/constants.js | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/assets/javascripts/sessions/new/components/update_email.vue b/app/assets/javascripts/sessions/new/components/update_email.vue index f63176e5513..192b46089ad 100644 --- a/app/assets/javascripts/sessions/new/components/update_email.vue +++ b/app/assets/javascripts/sessions/new/components/update_email.vue @@ -1,7 +1,6 @@ <script> import { GlForm, GlFormGroup, GlFormInput, GlButton } from '@gitlab/ui'; import { createAlert, VARIANT_SUCCESS } from '~/alert'; -import { isEmail } from '~/lib/utils/forms'; import axios from '~/lib/utils/axios_utils'; import { I18N_EMAIL, @@ -10,6 +9,7 @@ import { I18N_EMAIL_INVALID, I18N_UPDATE_EMAIL_SUCCESS, I18N_GENERIC_ERROR, + EMAIL_REGEXP, SUCCESS_RESPONSE, FAILURE_RESPONSE, } from '../constants'; @@ -47,7 +47,7 @@ export default { return ''; } - if (!isEmail(this.email)) { + if (!EMAIL_REGEXP.test(this.email)) { return I18N_EMAIL_INVALID; } diff --git a/app/assets/javascripts/sessions/new/constants.js b/app/assets/javascripts/sessions/new/constants.js index dec96f78232..c38829747fb 100644 --- a/app/assets/javascripts/sessions/new/constants.js +++ b/app/assets/javascripts/sessions/new/constants.js @@ -22,5 +22,6 @@ export const I18N_UPDATE_EMAIL_SUCCESS = s__( ); export const VERIFICATION_CODE_REGEX = /^\d{6}$/; +export const EMAIL_REGEXP = /^[^@\s]+@[^@\s]+$/; // Taken from DeviseEmailValidator export const SUCCESS_RESPONSE = 'success'; export const FAILURE_RESPONSE = 'failure'; |