Skip to content

Instantly share code, notes, and snippets.

View Andyliwr's full-sized avatar
🎯
Focusing

月光倾城 Andyliwr

🎯
Focusing
View GitHub Profile
@Andyliwr
Andyliwr / verifyPassword.js
Created June 21, 2019 06:43 — forked from yangjunjun/verifyPassword.js
测试密码强度
/**
* 测试密码强度
*
* 1.密码长度为[6-16]位,可以包含数字、字母、特殊符号
* 2.当密码含有一种类型(数字、字母、特殊符号),且长度小于8时,强度为弱;长度大于8时强度为中;
* 3.当密码含有一种类型(数字、字母、特殊符号),且长度小于8时,强度为弱;长度大于8时强度为中;
*/
function verifyPassword(val){
val = val.trim();