小程序判断手机号
var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+d{8})$/;if(phoneMobile.length===0){ wx.showToast({ title: '输入的手机号为空', icon: 'none', duration: 1500 }); return false;}else if (phoneMobile.length 11) { wx.showToast({ title: '手机号长度有误!', icon: 'none', duration: 1500 }); return false;} else if (!myreg.test(phoneMobile)) { wx.showToast({ title: '手机号有误!', icon: 'none', duration: 1500 }); return false;}
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。

