Skip to content

Commit 52b0e60

Browse files
authored
hotfix 3 for #98 (#101)
* 更新 index.ts * 更新 user.ts
1 parent 78a3947 commit 52b0e60

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/stores/user.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ export const useUserStore = defineStore('user', {
106106
},
107107
validatePasswordStrength(pwd: string): boolean {
108108
let strength = 0
109-
if (!(/^[ -\x7e]{8,14}/.test(pwd))) {
109+
if (!(/^[ -\x7e]{8,14}$/.test(pwd))) {
110110
return false
111111
}
112112
if (/^(?=.*[a-z])/.test(pwd)) {

src/views/user/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export async function modifyPasswordDialogs(
6161
) {
6262
function validatePasswordStrength(pwd: string): boolean {
6363
let strength = 0
64-
if (!/^[ -\x7e]{8,14}/.test(pwd)) {
64+
if (!/^[ -\x7e]{8,14}$/.test(pwd)) {
6565
return false
6666
}
6767
if (/^(?=.*[a-z])/.test(pwd)) {

0 commit comments

Comments
 (0)