From 4a5c8756b43466b8cd84f3d7b86843777c473a7e Mon Sep 17 00:00:00 2001 From: Pranav C <61551451+pranavxc@users.noreply.github.com> Date: Sat, 3 Jul 2021 15:15:27 +0530 Subject: [PATCH] fix(gui): email validation Signed-off-by: Pranav C <61551451+pranavxc@users.noreply.github.com> --- packages/nc-gui/pages/user/authentication/signup/_token.vue | 3 ++- packages/nc-gui/pages/user/password/forgot.vue | 3 ++- packages/nc-gui/pages/user/password/reset/form.vue | 4 +++- packages/nc-gui/pages/user/password/reset/index.vue | 4 +++- packages/nc-gui/pages/user/settings/index.vue | 4 +++- packages/nc-gui/pages/user/settings/password.vue | 4 +++- 6 files changed, 16 insertions(+), 6 deletions(-) diff --git a/packages/nc-gui/pages/user/authentication/signup/_token.vue b/packages/nc-gui/pages/user/authentication/signup/_token.vue index 3ef095a010..1c8fdb341b 100644 --- a/packages/nc-gui/pages/user/authentication/signup/_token.vue +++ b/packages/nc-gui/pages/user/authentication/signup/_token.vue @@ -230,6 +230,7 @@ // "./libs" // ); import {mapGetters, mapActions} from 'vuex' +import {isEmail} from "@/helpers"; // import VueRecaptcha from 'vue-recaptcha'; export default { @@ -253,7 +254,7 @@ export default { formRules: { email: [ v => !!v || 'E-mail is required', - v => /^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/.test(v) || 'E-mail must be valid' + v => isEmail(v) || 'E-mail must be valid' ], password: [ v => (this.PasswordValidate(v)) || this.passwordValidateMsg diff --git a/packages/nc-gui/pages/user/password/forgot.vue b/packages/nc-gui/pages/user/password/forgot.vue index e64ace9a3c..494a2e0d66 100644 --- a/packages/nc-gui/pages/user/password/forgot.vue +++ b/packages/nc-gui/pages/user/password/forgot.vue @@ -63,6 +63,7 @@