This commit is contained in:
@fawn-nine
2024-05-29 15:54:19 +08:00
parent 4386f615f2
commit 92df12db8e
4 changed files with 98 additions and 17 deletions

View File

@@ -20,15 +20,7 @@
var clear;
import {
mapState
} from 'vuex';
// 密码验证的正则
//1、密码为八位及以上并且字母数字特殊字符三项都包括
var strongRegex = new RegExp("^(?=.{8,})(?=.*[A-Z])(?=.*[a-z])(?=.*[0-9])(?=.*\\W).*$", "g");
//2、密码为八位及以上并且字母、数字、特殊字符三项中有两项强度是中等
var mediumRegex = new RegExp(
"^(?=.{8,})(((?=.*[A-Z])(?=.*[a-z]))|((?=.*[A-Z])(?=.*[0-9]))|((?=.*[a-z])(?=.*[0-9]))|((?=.*[a-z])(?=.*\\W))|((?=.*[0-9])(?=.*\\W))|((?=.*[A-Z])(?=.*\\W))).*$",
"g");
var enoughRegex = new RegExp("(?=.{8,}).*", "g");
} from 'vuex';
export default {
data() {
return {