diff --git a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue
index aba9809fe..34fd39e68 100644
--- a/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue
+++ b/frontend/src/views/Pages/UserProfile/UserCard_FormUserPasswort.vue
@@ -20,7 +20,7 @@
-
+
{{ $t('form.password_old') }}
@@ -43,6 +43,7 @@
+
{{ $t('form.password_new') }}
@@ -89,6 +90,26 @@
+
+
+
+
+
+
+
+ {{ $t('site.signup.dont_match') }}
+
+
+
+
+
+
@@ -165,6 +186,31 @@ export default {
}
},
},
+ computed: {
+ samePasswords() {
+ return this.password === this.passwordNew
+ },
+ rules() {
+ return [
+ { message: this.$t('site.signup.lowercase'), regex: /[a-z]+/ },
+ { message: this.$t('site.signup.uppercase'), regex: /[A-Z]+/ },
+ { message: this.$t('site.signup.minimum'), regex: /.{8,}/ },
+ { message: this.$t('site.signup.one_number'), regex: /[0-9]+/ },
+ ]
+ },
+ passwordValidation() {
+ const errors = []
+ for (const condition of this.rules) {
+ if (!condition.regex.test(this.passwordNew)) {
+ errors.push(condition.message)
+ }
+ }
+ if (errors.length === 0) {
+ return { valid: true, errors }
+ }
+ return { valid: false, errors }
+ },
+ },
}