通过正则判断手机号的格式
var myreg = /^1[3456789]\d{9}$/;
if (!myreg.test(this.data.phonenum)) {
wx.showToast({
title: '手机号有误',
icon: 'none'
})
return false;
}
通过正则判断手机号的格式
var myreg = /^1[3456789]\d{9}$/;
if (!myreg.test(this.data.phonenum)) {
wx.showToast({
title: '手机号有误',
icon: 'none'
})
return false;
}