ztxkutils 2.10.40 → 2.10.41
Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
export { c as authority } from './authority-e6bde99f.js';
|
2
2
|
export { d as dataModel } from './dataModel-1fbaff40.js';
|
3
3
|
export { t as tools } from './tools-09a4d620.js';
|
4
|
-
export { v as validate } from './validate-
|
4
|
+
export { v as validate } from './validate-20c4d4f6.js';
|
5
5
|
export { r as request } from './request-ba8abf99.js';
|
6
6
|
export { r as reqUrl } from './reqUrl-787dd9e5.js';
|
7
7
|
import './tslib.es6-35653116.js';
|
@@ -115,7 +115,22 @@ function validatePassword(password, username) {
|
|
115
115
|
startChart = 0;
|
116
116
|
}
|
117
117
|
}
|
118
|
-
//
|
118
|
+
// 检查密码中是否有相同且连续的字符 超过三次
|
119
|
+
var count1 = 0;
|
120
|
+
for (var i = 0; i < password.length - 1; i++) {
|
121
|
+
if (password[i] === password[i + 1]) {
|
122
|
+
count1++;
|
123
|
+
if (count1 >= 2) {
|
124
|
+
return {
|
125
|
+
result: false,
|
126
|
+
message: '密码中有相同的字符!',
|
127
|
+
};
|
128
|
+
}
|
129
|
+
}
|
130
|
+
else {
|
131
|
+
count1 = 0;
|
132
|
+
}
|
133
|
+
}
|
119
134
|
var uniqueChars = new Set(password.split(''));
|
120
135
|
if (uniqueChars.size !== password.length) {
|
121
136
|
return {
|
package/dist/validate.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
export { c as commonMessage, b as validate, a as validatePassword } from './validate-
|
1
|
+
export { c as commonMessage, b as validate, a as validatePassword } from './validate-20c4d4f6.js';
|