UNPKG
tyro-util
Version:
latest (2.5.3)
2.5.3
2.5.2
2.5.1
2.5.0
2.4.0
2.3.0
2.2.1
2.2.0
2.1.4
2.1.3
2.1.2
2.1.1
2.1.0
2.0.0
1.1.0
1.0.0
前端常用工具库
github.com/tyrocjh/my-util
tyrocjh/my-util
tyro-util
/
src
/
regex
/
isValidPwd.js
11 lines
(9 loc)
•
266 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
11
/** *
@desc
判断密码格式是否6-25字符必须包含大小写字母+数字 *
@param
{String} str *
@return
{Boolean} */
const
isValidPwd
=
str => {
return
/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[^]{
6
,
25
}$/.test(str) }
module
.
exports
= isValidPwd