手机号校验:const phoneReg = /^[1][3,4,5,6,7,8,9][0-9]{9}$/
身份证校验:const sfzReg = /^[1-9]\d{5}(18|19|([23]\d))\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
邮箱的校验:const emailReg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/
url校验:const urlReg = /^((https?|ftp|file):\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$/
日期:const dateReg = /^\d{4}(\-)\d{1,2}\1\d{1,2}$/
小数:const floatReg = /^[-\+]?\d+(\.\d+)?$/
邮政编号:const postalNoReg = /^\d{6}$/
QQ号:const qqReg = /^[1-9][0-9]{4,10}$/
微信号:const wxReg = /^[a-zA-Z]([-_a-zA-Z0-9]{5,19})+$/
密码强度(密码中必须包含字母、数字、特称字符,至少8个字符,最多30个字符):
const passwordReg = /(?=.*[0-9])(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{8,30}/