b6c72052 by zhangmeng

邮箱正则

1 parent 8fdfc7b0
...@@ -544,8 +544,16 @@ function sendEmail() { ...@@ -544,8 +544,16 @@ function sendEmail() {
544 ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email') 544 ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email')
545 return 545 return
546 } 546 }
547 if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) { 547 // if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) {
548 ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email') 548 // ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email')
549 // return
550 // }
551 if (form.value.email.indexOf('@') == -1) {
552 if (language.value == 0) {
553 ElMessage.warning('请填写正确的邮箱')
554 } else {
555 ElMessage.warning('Please fill in the correct email')
556 }
549 return 557 return
550 } 558 }
551 codeloading.value = true 559 codeloading.value = true
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!