当前位置:网站首页>The registration password of day 239/300 is 8~14 alphanumeric and punctuation, and at least 2 checks are included
The registration password of day 239/300 is 8~14 alphanumeric and punctuation, and at least 2 checks are included
2022-07-06 06:40:00 【Arden Zhao】
( One ) demand
The registration password should be verified , The requirement is :
- The length is 8~14 Characters
- Alphanumeric and punctuation symbols shall contain at least 2 Kind of
- No Spaces allowed 、 chinese
( Two ) Ideas
1、 Each condition is checked separately
- The length is 8~14 Characters
str.length
- Alphanumeric and punctuation symbols shall contain at least 2 Kind of
- No Spaces allowed 、 chinese
2、 Regular check
const rules = /(?!^[0-9]+$)(?!^[A-z]+$)(?!^[^A-z0-9]+$)^[^\s\u4e00-\u9fa5]{8,14}$/
if (!rules.test(value)) {
return Promise.reject(' The length is 8~14; Alphanumeric and punctuation symbols shall contain at least 2 Kind of ; No Spaces allowed 、 chinese ')
}
( 3、 ... and ) Other regularities used
1、 cell-phone number
const phone = /^1(3\d|4[5-9]|5[0-35-9]|6[2567]|7[0-8]|8\d|9[0-35-9])\d{8}$/
if (!phone.test(this.form.account)) {
message.warning(' The phone number format is incorrect ')
return
}
2、 mailbox
const email = /^\w+(\.)?(\w+)[email protected][0-9a-z]+(\.[a-z]+){1,3}$/
if (!email.test(this.form.account)) {
message.warning(' The email format is incorrect ')
return false
}
Write it at the end
On the way to study , Often slack off
《 There are students who want to learn technology and need supervision ~》
https://mp.weixin.qq.com/s/FyuddlwRY7DsHUejCjiVug
边栏推荐
- Classification des verbes reconstruits grammaticalement - - English Rabbit Learning notes (2)
- Chinese English comparison: you can do this Best of luck
- Day 245/300 JS forEach 多层嵌套后数据无法更新到对象中
- Luogu p2089 roast chicken
- Drug disease association prediction based on multi-scale heterogeneous network topology information and multiple attributes
- Oscp raven2 target penetration process
- 如何将flv文件转为mp4文件?一个简单的解决办法
- Grouping convolution and DW convolution, residuals and inverted residuals, bottleneck and linearbottleneck
- 红蓝对抗之流量加密(Openssl加密传输、MSF流量加密、CS修改profile进行流量加密)
- 自动化测试环境配置
猜你喜欢
On the first day of clock in, click to open a surprise, and the switch statement is explained in detail
关于新冠疫情,常用的英文单词、语句有哪些?
What are the characteristics of trademark translation and how to translate it?
生物医学英文合同翻译,关于词汇翻译的特点
Making interactive page of "left tree and right table" based on jeecg-boot
Office doc add in - Online CS
基于JEECG-BOOT的list页面的地址栏参数传递
Use shortcut LNK online CS
金融德语翻译,北京专业的翻译公司
My seven years with NLP
随机推荐
Office-DOC加载宏-上线CS
LeetCode 732. My schedule III
如何做好互联网金融的英语翻译
LeetCode 729. My schedule I
org.activiti.bpmn.exceptions.XMLException: cvc-complex-type.2.4.a: 发现了以元素 ‘outgoing‘ 开头的无效内容
Black cat takes you to learn UFS protocol Chapter 18: how UFS configures logical units (Lu Management)
Office doc add in - Online CS
Data security -- 13 -- data security lifecycle management
翻译生物医学说明书,英译中怎样效果佳
基于JEECG-BOOT的list页面的地址栏参数传递
英语论文翻译成中文字数变化
My daily learning records / learning methods
Luogu p2141 abacus mental arithmetic test
Past and present lives of QR code and sorting out six test points
What are the commonly used English words and sentences about COVID-19?
E-book CHM online CS
ML之shap:基于adult人口普查收入二分类预测数据集(预测年收入是否超过50k)利用Shap值对XGBoost模型实现可解释性案例之详细攻略
How much is the price for the seal of the certificate
University of Manchester | dda3c: collaborative distributed deep reinforcement learning in swarm agent systems
[Yu Yue education] Dunhuang Literature and art reference materials of Zhejiang Normal University