natasha 2 anni fa
parent
commit
0d2b14d756

+ 1 - 1
src/components/login/ForgetPassword.vue

@@ -243,7 +243,7 @@ export default {
     ChangeUsername() {
       if (this.phone_or_email) {
         if (this.loginType == "邮箱") {
-          let reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证邮箱的正则
+          let reg = /^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证邮箱的正则
           this.EmailCorrect = reg.test(this.phone_or_email);
           if (!this.EmailCorrect) {
             this.accountError = true;

+ 1 - 1
src/components/login/registration.vue

@@ -456,7 +456,7 @@ export default {
     },
     // 验证邮箱
     ChangeEmail() {
-      let reg = /^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证邮箱的正则
+      let reg = /^[a-zA-Z0-9_\.-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/; //验证邮箱的正则
       this.EmailError = reg.test(this.ruleForm.email);
       if (!this.EmailError) {
         this.EmailError = false;