8 lines
451 B
TypeScript
8 lines
451 B
TypeScript
//手机号正则
|
|
export const PHONE_REG = /^1[0-9]{10}$/
|
|
//网址正则
|
|
export const URL_REG = /^https?:\/\/(([a-zA-Z0-9_-])+(\.)?)*(:\d+)?(\/((\.)?(\?)?=?&?[a-zA-Z0-9_-](\?)?)*)*$/i
|
|
//身份证正则
|
|
export const IDCARDREG = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/
|
|
//邮箱正则
|
|
export const EMAILREG = /\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/ |