@xilonglab/vue-main 1.6.37 → 1.6.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/page/setting.vue +3 -1
- package/package.json +1 -1
package/dist/page/setting.vue
CHANGED
|
@@ -9,11 +9,13 @@ const error = reactive({ oldPassword: '', newPassword: '', repeatPassword: '' })
|
|
|
9
9
|
|
|
10
10
|
const validateNewPassword = (rule, value, callback) => {
|
|
11
11
|
if (!value || value.length < 6) {
|
|
12
|
-
callback(new Error('
|
|
12
|
+
callback(new Error('密码长度不低于6位'))
|
|
13
13
|
} else if (/^\d+$/.test(value)) {
|
|
14
14
|
callback(new Error('密码不能为纯数字'))
|
|
15
15
|
} else if (/^[a-zA-Z]+$/.test(value)) {
|
|
16
16
|
callback(new Error('密码不能为纯字母'))
|
|
17
|
+
} else if (value && value === data.oldPassword) {
|
|
18
|
+
callback(new Error('新密码不能与原密码相同'))
|
|
17
19
|
} else {
|
|
18
20
|
callback()
|
|
19
21
|
}
|