Browse Source

🐞 fix(validate): 添加校验

hxl 8 months ago
parent
commit
9567b7587b
2 changed files with 0 additions and 2 deletions
  1. 0 1
      src/utils/el-validate.js
  2. 0 1
      src/utils/validate.js

+ 0 - 1
src/utils/el-validate.js

@@ -1,7 +1,6 @@
 import { isEmail, isValidPhone } from "./validate"
 import { isEmail, isValidPhone } from "./validate"
 
 
 export function elIsEmail(rule, value, callback) {
 export function elIsEmail(rule, value, callback) {
-    console.log('value',value);
     if (!value) {
     if (!value) {
         return callback(new Error('Please enter your email'))
         return callback(new Error('Please enter your email'))
     }
     }

+ 0 - 1
src/utils/validate.js

@@ -5,7 +5,6 @@ export function validMobile(str) {
     return /^1[3-9][0-9]{9}$/.test(str)
     return /^1[3-9][0-9]{9}$/.test(str)
 }
 }
 export function isEmail(str) {
 export function isEmail(str) {
-    console.log(str);
     return /^([a-zA-Z0-9]+[-_\.]?)+@[a-zA-Z0-9]+\.[a-z]+$/.test(str)
     return /^([a-zA-Z0-9]+[-_\.]?)+@[a-zA-Z0-9]+\.[a-z]+$/.test(str)
 }
 }
 export function isValidPhone(str) {
 export function isValidPhone(str) {