UNPKG

asp-smart-ui-plus-test

Version:

A Component Library for Vue 3

23 lines (21 loc) 772 B
const tel = /^(\d{3,4}-\d{3,8})+(-\d{1,4})?$/; const phone = /^1[3|4|5|6|7|8|9][0-9]\d{8}$/; const telPhone = /(^1[3|4|5|6|7|8|9][0-9]\d{8}$)|(^(\d{3,4}-\d{3,8})+(-\d{1,4})?$)/; const per = /^(([1-9])?([0-9]).([0-9]){2})$/; const decNum = /^[0-9]+\.{0,1}[0-9]{0,2}$/; const intNum = /^[1-9]\d*$/; const IDCard = /^(^[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])$)$/; const nonChinese = /[\u4E00-\u9FA5]+/; const emailReg = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/; var pattern = { tel, phone, telPhone, per, decNum, intNum, IDCard, nonChinese, emailReg }; export { IDCard, decNum, pattern as default, emailReg, intNum, nonChinese, per, phone, tel, telPhone };