b6c72052 by zhangmeng

邮箱正则

1 parent 8fdfc7b0
......@@ -544,8 +544,16 @@ function sendEmail() {
ElMessage.error(language.value == 0 ? '请输入邮箱' : 'Please enter contact Email')
return
}
if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) {
ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email')
// if (!/^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\.[a-zA-Z0-9_-]+)+$/.test(form.value.email)) {
// ElMessage.error(language.value == 0 ? '请输入正确的邮箱' : 'Please enter the correct contact email')
// return
// }
if (form.value.email.indexOf('@') == -1) {
if (language.value == 0) {
ElMessage.warning('请填写正确的邮箱')
} else {
ElMessage.warning('Please fill in the correct email')
}
return
}
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!