邮箱@后面全改为小写、邮箱格式提示信息文字错误修改

This commit is contained in:
付民康
2025-03-26 16:51:40 +08:00
parent 563023b725
commit b083ee3383
2 changed files with 9 additions and 2 deletions

View File

@@ -161,7 +161,7 @@ export const checkEmailValidator = (rule: any, value: any, callback: any) => {
return callback(new Error('邮箱不能为空'));
}
// 根据 value 正则校验邮箱格式成功返回回调callback
const reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
const reg = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/;
if (!reg.test(value)) {
return callback(new Error('邮箱根式不正确'));
}