//校验手机号
blurPhone: function(e) {
let that = this
//这里的3,4,5,7,8,,代表1XX,
if (!(/^1[3456789]\d{9}$/.test(phone))) {
if (phone.length > 11 || phone.length < 11) {
wx.showToast({
title: '手机号有误',
icon: 'none',
duration: 2000
})
return
}
wx.showToast({
title: '手机号有误',
icon: 'none',
duration: 2000
})
return
} else {
wx.showToast({
title: '手机号正确',
icon: 'none',
duration: 2000
})
}
},
【手机号检验】
于 2022-06-21 17:17:37 首次发布