Browse Source

邮箱验证

gcz 2 years ago
parent
commit
51a65d4cab
1 changed files with 9 additions and 1 deletions
  1. 9 1
      src/views/register.vue

+ 9 - 1
src/views/register.vue

@@ -162,7 +162,7 @@
           <div class="form-step form-step2" v-show="stepActive == '2'">
             <el-row :gutter="20">
               <el-col :span="12"
-                ><el-form-item label="">
+                ><el-form-item label="" prop="email">
                   <div class="inner-wrap">
                     <el-input
                       v-model="form.email"
@@ -454,6 +454,14 @@ export default {
             trigger: "blur",
           },
         ],
+        email: [
+          {
+            required: false,
+            pattern: /^[A-Za-z0-9\u4e00-\u9fa5]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/,
+            message: "请输入正确邮箱",
+            trigger: "blur",
+          },
+        ],
         registerCode: [
           { required: true, message: "请输入验证码", trigger: "blur" },
         ],