diff --git a/frontend/components/Domain/User/UserPasswordStrength.vue b/frontend/components/Domain/User/UserPasswordStrength.vue new file mode 100644 index 00000000..2ef5a140 --- /dev/null +++ b/frontend/components/Domain/User/UserPasswordStrength.vue @@ -0,0 +1,38 @@ + + + + {{ $t("user.password-strength", { strength: pwStrength.strength.value }) }} + + + + + + + + diff --git a/frontend/components/global/AutoForm.vue b/frontend/components/global/AutoForm.vue index 83a28805..3b9059ff 100644 --- a/frontend/components/global/AutoForm.vue +++ b/frontend/components/global/AutoForm.vue @@ -187,9 +187,16 @@ export default defineComponent({ const list = [] as ((v: string) => boolean | string)[]; keys.forEach((key) => { - if (key in validators) { - // @ts-ignore TODO: fix this - list.push(validators[key]); + const split = key.split(":"); + const validatorKey = split[0] as ValidatorKey; + if (validatorKey in validators) { + if (split.length === 1) { + // @ts-ignore- validators[validatorKey] is a function + list.push(validators[validatorKey]); + } else { + // @ts-ignore - validators[validatorKey] is a function + list.push(validators[validatorKey](split[1])); + } } }); return list; diff --git a/frontend/components/global/ToggleState.vue b/frontend/components/global/ToggleState.vue index 90f06a82..36321c43 100644 --- a/frontend/components/global/ToggleState.vue +++ b/frontend/components/global/ToggleState.vue @@ -6,8 +6,7 @@