const emailReg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/g
if (!emailReg.test(this.user.email) || !this.user.email) {
this.$showMessage('danger', '请输入正确的邮箱格式')
return
}
const emailReg = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/g
if (!emailReg.test(this.user.email) || !this.user.email) {
this.$showMessage('danger', '请输入正确的邮箱格式')
return
}
本文标题:校验邮箱
本文链接:https://www.haomeiwen.com/subject/pnaqwqtx.html
网友评论