企业库-企业详情-新增常用联系人的邮箱校验修改

lijinlong
吕天方 1 month ago
parent dfc7d661e1
commit 4c90355d20

@ -1,6 +1,6 @@
{ {
"name": "ruoyi", "name": "ruoyi",
"version": "1.0.202411290932", "version": "1.0.202412061713",
"description": "金鸡湖现代服务业品牌管理系统", "description": "金鸡湖现代服务业品牌管理系统",
"author": "若依", "author": "若依",
"license": "MIT", "license": "MIT",

@ -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'}
], ],
}, },

Loading…
Cancel
Save