Browse Source

正则修改

master_hella_20240701
chenfang 7 months ago
parent
commit
de27cb80c3
  1. 2
      src/utils/validator.ts

2
src/utils/validator.ts

@ -21,7 +21,7 @@ export function validateCode(rule, value, callback) {
//校验邮箱 //校验邮箱
export function validateEmail(rule, value, callback) { export function validateEmail(rule, value, callback) {
if (value) { if (value) {
const mailReg = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-])+/ const mailReg = /^([a-zA-Z0-9_-]+.)+@([a-zA-Z0-9_-])+(.[a-zA-Z0-9_-]+.)+/
if (mailReg.test(value)) { if (mailReg.test(value)) {
callback() callback()
} else { } else {

Loading…
Cancel
Save