| | |
| | | const rep = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/; |
| | | return rep.test(str); |
| | | } |
| | | // |
| | | // 验证车牌号 |
| | | export function validateCarNum(str){ |
| | | const regExp = /(^[京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领A-Z]{1}[A-Z]{1}[A-Z0-9]{4}[A-Z0-9挂学警港澳]{1}$)/; |
| | | return regExp.test(str); |
| | | } |
| | | // 校验数字 |
| | | export function validateNum(str){ |
| | | const rep = /^[0-9]+(.[0-9]{1,3})?$/; |
| | | return rep.test(str); |
| | | } |
| | | // 验证身份证号 |
| | | export function validateCardId(str){ |
| | | const rep=/^\d{15}|\d{}18$/ |
| | | return rep.test(str); |
| | | } |
| | | |