|
|
@ -105,7 +105,8 @@ export default {
|
|
|
|
//验证邮箱的规则
|
|
|
|
//验证邮箱的规则
|
|
|
|
var checkEmail = (rule,value,cb) => {
|
|
|
|
var checkEmail = (rule,value,cb) => {
|
|
|
|
//验证邮箱的正则表达式
|
|
|
|
//验证邮箱的正则表达式
|
|
|
|
const regEmail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
|
|
|
|
// const regEmail = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(\.[a-zA-Z0-9_-])+/;
|
|
|
|
|
|
|
|
const regEmail = /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*(\.[a-zA-Z]{2,})$/
|
|
|
|
if(regEmail.test(value)){
|
|
|
|
if(regEmail.test(value)){
|
|
|
|
//合法的邮箱
|
|
|
|
//合法的邮箱
|
|
|
|
return cb();
|
|
|
|
return cb();
|
|
|
@ -156,6 +157,7 @@ export default {
|
|
|
|
],
|
|
|
|
],
|
|
|
|
contactEmail:[
|
|
|
|
contactEmail:[
|
|
|
|
{ required: true, message: '请填写常用联系人邮箱', trigger: 'blur' },
|
|
|
|
{ required: true, message: '请填写常用联系人邮箱', trigger: 'blur' },
|
|
|
|
|
|
|
|
// { type:"email", message: '请输入正确的邮箱地址', trigger: 'blur'}
|
|
|
|
{validator: checkEmail, trigger: 'blur'}
|
|
|
|
{validator: checkEmail, trigger: 'blur'}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
},
|
|
|
|
},
|
|
|
|