当前位置:网站首页>正则全匹配:密码由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()
}
}
边栏推荐
- 迅為恩智浦iTOP-IMX6開發平臺
- Idea remote debugging remote JVM debug
- 2. successfully solved bug:exception when publishing [Failed to connect and initialize SSH connection...
- 并发请求下如何防重复提交
- What about punctuation in the first column of unity text
- Some technology sharing
- Unity timeline data binding
- What is digicert smart seal?
- c#控制台格式化代码
- Template parameter package and function parameter package
猜你喜欢

LeetCode 3. 无重复字符的最长子串

prompt learning 一个空格引发的血案
![[Postgres] Postgres database migration](/img/45/7074aa766640160a3b6f00b109cb2f.png)
[Postgres] Postgres database migration

Differences among digicert, SECTIONO and globalsign code signing certificates

【直播笔记0629】 并发编程二:锁

Two methods of SSL certificate format conversion

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

HTA入门基础教程 | VBS脚本的GUI界面 HTA简明教程 ,附带完整历程及界面美化

What is the concept of string in PHP

Welfare lottery | what are the highlights of open source enterprise monitoring zabbix6.0
随机推荐
The rigorous judgment of ID number is accurate to the last place in the team
并发请求下如何防重复提交
O & M (21) make winpe startup USB flash disk
Precautions for purchasing wildcard SSL certificate
Lua Basics
备忘一下es6的export/import和类继承的用法
Uniapp address translation latitude and longitude
CMake教程系列-02-使用cmake代碼生成二進制
SQLite use
Azure 开发者新闻快讯丨开发者6月大事记一览
C console format code
Intel-Hex , Motorola S-Record 格式详细解析
What about punctuation in the first column of unity text
JvxeTable子表记录加载完毕事件
(graph theory) connected component (template) + strongly connected component (template)
Unity timeline data binding
Template parameter package and function parameter package
Cmake tutorial series-01-minimum configuration example
CMake教程系列-02-使用cmake代码生成二进制
2022 the action of protecting the net is imminent. Things about protecting the net