当前位置:网站首页>[regular] judgment, mobile number, ID number
[regular] judgment, mobile number, ID number
2022-07-27 03:25:00 【Hey, little apple】
1, You can only enter your mobile phone number , And separated by English commas
oninput() {
this.checkMobile(this.phone)
},
checkMobile(str) {
var Tel = /^((\+?86)|(\(\+86\)))?\d{3,4}-\d{7,8}(-\d{3,4})?$/
var fu = /(((1[73584]\d{9}))\,){0,}((1[73584]\d{9}))$/
if (Tel.test(str) || fu.test(str)) {
// Is the mobile phone
} else {
// Matching failure
this.$message.error(' The phone number format is incorrect ')
}
},
2, verification ID number
var reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/;
if(reg.test(this.idNumber) === false){
this.$toast(' Please enter the correct ID number ');
return false;
}
ID number , Birthday Show asterisks **** Instead of
// Use
this.changeIdCardIncludeStart(this.idNumber)
changeIdCardIncludeStart (cardId) {
const newStr = cardId.replace(/^(.{6})(?:\d+)(.{4})$/,"$1****$2");
return newStr;
},
边栏推荐
- [learning notes, dog learning C] string + memory function
- 渗透测试-后渗透-痕迹清理
- opiodr aborting process unknown ospid (21745) as a result of ORA-609
- vector 转 svg 方法
- “满五唯一”和“满二唯一”是什么?有什么不同?
- Docker creates MySQL 8.x container and supports Mac and arm architecture chips
- 太强了,一个注解搞定接口返回数据脱敏
- DNS记录类型及相关名词解释
- 基于.NetCore开发博客项目 StarBlog - (16) 一些新功能 (监控/统计/配置/初始化)
- shell awk
猜你喜欢

Source code analysis of warning notification for skywalking series learning

Mysql: summary of common sub database and sub table schemes of Internet companies

Spark Learning Notes (VI) -- spark core core programming RDD action operator

flask_restful中reqparse解析器继承

spark:地区广告点击量排行统计(小案例)

MySQL:互联网公司常用分库分表方案汇总

阿里 Seata 新版本终于解决了 TCC 模式的幂等、悬挂和空回滚问题

Abbkine AbFluor 488 细胞凋亡检测试剂盒特点及实验建议

字节一面:TCP 和 UDP 可以使用同一个端口吗?

$128million! IQM, a Finnish quantum computing company, was supported by the world fund
随机推荐
数据库使用安全策略
最低票价(DAY 80)
数据库红的表如何设计才能使性能更加优化
spark:计算不同分区中相同key的平均值(入门级-简单实现)
AcWing 2074. 倒计数 模拟
be based on. NETCORE development blog project starblog - (16) some new functions (monitoring / statistics / configuration / initialization)
Worthington果胶酶的特性及测定方案
Idea 中添加支持@Data 插件
Jmeter分布式压测
Take you to know what Web3.0 is
shell awk
Indexing best practices
Explain
C语言const用法详解
Activiti5.22.0 extension supports domestic databases, taking gbase database as an example
网络安全/渗透测试工具AWVS14.9下载/使用教程/安装教程
快速排序及优化
水仙花数(DAY 78)
Common weak password Encyclopedia
30分钟彻底弄懂 synchronized 锁升级过程