checkemail.js 217 B

1234567
  1. // 验证邮箱
  2. export default (email) => {
  3. if (email === undefined || email === '' || !email.match(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/)) {
  4. return false
  5. }
  6. return true
  7. }