Browse Source

FIX(sdkForm):调整表单提交逻辑

liyangbin 2 years ago
parent
commit
411dbb40fc
1 changed files with 4 additions and 5 deletions
  1. 4 5
      components/SdkForm.vue

+ 4 - 5
components/SdkForm.vue

@@ -364,15 +364,14 @@ export default {
           emptyItems.push(item)
         }
       })
-      const regEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/
-      if(!emptyItems.includes('email') && regEmail.test(this.form.email)) {
+      // const regEmail = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/
+      if(!emptyItems.includes('email')) {
         emptyItems.push('right-email')
       }
-      const regPhone = /^1[3456789]\d{9}$/
-      if(!emptyItems.includes('phone') && regPhone.test(this.form.phone)) {
+      // const regPhone = /^1[3456789]\d{9}$/
+      if(!emptyItems.includes('phone')) {
         emptyItems.push('right-phone')
       }
-      console.log(emptyItems)
       return emptyItems
     }
   },