Merge pull request #424 from gradido/408-Untranslated-password-requirements-on-reset-password

translation password rules in Register.vue and ResetPasswort.vue fixed
This commit is contained in:
Alexander Friedland 2021-05-13 13:31:02 +02:00 committed by GitHub
commit 6e218c00dc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 13 deletions

View File

@ -97,7 +97,6 @@
</p> </p>
</div> </div>
</transition> </transition>
<b-row class="my-4"> <b-row class="my-4">
<b-col cols="12"> <b-col cols="12">
<base-input <base-input
@ -164,12 +163,7 @@ export default {
email: '', email: '',
agree: false, agree: false,
}, },
rules: [
{ 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]+/ },
],
password: '', password: '',
checkPassword: '', checkPassword: '',
passwordVisible: false, passwordVisible: false,
@ -231,6 +225,14 @@ export default {
emailFilled() { emailFilled() {
return this.model.email !== '' return this.model.email !== ''
}, },
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() { passwordValidation() {
const errors = [] const errors = []
for (const condition of this.rules) { for (const condition of this.rules) {

View File

@ -90,12 +90,6 @@ export default {
name: 'reset', name: 'reset',
data() { data() {
return { return {
rules: [
{ 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]+/ },
],
password: '', password: '',
checkPassword: '', checkPassword: '',
passwordVisible: false, passwordVisible: false,
@ -137,6 +131,14 @@ export default {
passwordsFilled() { passwordsFilled() {
return this.password !== '' && this.checkPassword !== '' return this.password !== '' && this.checkPassword !== ''
}, },
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() { passwordValidation() {
const errors = [] const errors = []
for (const condition of this.rules) { for (const condition of this.rules) {