当前位置:网站首页>正则全匹配:密码由8位以上数字,大小写字母,特殊字符组成
正则全匹配:密码由8位以上数字,大小写字母,特殊字符组成
2022-06-30 02:55:00 【阿雷前进中...】
const validatePass = (rule, value, callback) => {
// 密码由8位以上数字,大小写字母,特殊字符组成
const re = new RegExp(`^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*\\W)[^]{8,32}$`)
if (value === '') {
callback(new Error('请输入密码'))
} else if (!re.test(value)) {
callback(new Error('密码由8位以上数字,大小写字母,特殊字符组成'))
} else {
callback()
}
}
边栏推荐
- Raki's notes on reading paper: Leveraging type descriptions for zero shot named entity recognition and classification
- What is digicert smart seal?
- Unity TimeLine 数据绑定
- Cmake tutorial series-01-minimum configuration example
- NLP text summary: data set introduction and preprocessing [New York Times annotated corpus]
- Time complexity analysis
- Global and Chinese market of ERP software for garment and textile industries 2022-2028: Research Report on technology, participants, trends, market size and share
- 002 color classification
- What files does a CA digital certificate contain? How to view SSL certificate information?
- threejs 镜子案例Reflector 创建镜子+房子搭建+小球移动
猜你喜欢

Precautions for purchasing wildcard SSL certificate

并发请求下如何防重复提交

Série de tutoriels cmake - 02 - génération de binaires à l'aide du Code cmake

What should academic presentation /ppt do?

FDA mail security solution

Time complexity analysis

What is the difference between a layer 3 switch and a layer 2 switch

Linear algebra Chapter 3 summary of vector and vector space knowledge points (Jeff's self perception)

Wechat applet page Jump and parameter transfer

Detailed explanation of minimum stack
随机推荐
2.8 【 weight of complete binary tree 】
Xunwei NXP itop-imx6 development platform
Intel-Hex , Motorola S-Record 格式详细解析
Série de tutoriels cmake - 02 - génération de binaires à l'aide du Code cmake
How to use vant to realize data paging and drop-down loading
在php中字符串的概念是什么
怎么利用Redis实现点赞功能
RAII内存管理
How to prevent phishing emails? S/mime mail certificate
Call collections Sort() method, compare two person objects (by age ratio first, and by name ratio for the same age), and pass lambda expression as a parameter.
Detailed explanation of minimum stack
Global and Chinese market for defense network security 2022-2028: Research Report on technology, participants, trends, market size and share
threejs 镜子案例Reflector 创建镜子+房子搭建+小球移动
NLP text summary: data set introduction and preprocessing [New York Times annotated corpus]
What should academic presentation /ppt do?
多卡服务器使用
Tp6 framework integrates JWT for token authentication
Threejs mirror case reflector create mirror + house construction + small ball movement
unity的text首列有标点符号咋办
What is the concept of string in PHP