html5表单pattern属性配合正则验证电话和手机号码
参考地址:https://www.cnblogs.com/lihuahaiyan/p/6196824.html
<input id="private_phone" name="private_phone" pattern="(\d{11})|^((\d{7,8})|(\d{4}|\d{3})-(\d{7,8})|(\d{4}|\d{3})-(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1})|(\d{7,8})-(\d{4}|\d{3}|\d{2}|\d{1}))$" required="required" type="text" />