diff --git a/frontend/src/components/input/password.vue b/frontend/src/components/input/password.vue index d6812a5fc8..a3d9279335 100644 --- a/frontend/src/components/input/password.vue +++ b/frontend/src/components/input/password.vue @@ -42,6 +42,10 @@ const props = defineProps({ modelValue: String, // This prop is a workaround to trigger validation from the outside when the user never had focus in the input. validateInitially: Boolean, + validateMinLength: { + type: Boolean, + default: true, + }, }) const emit = defineEmits(['submit', 'update:modelValue']) const {t} = useI18n() @@ -62,12 +66,12 @@ const validate = useDebounceFn(() => { return } - if (password.value.length < 8) { + if (props.validateMinLength && password.value.length < 8) { isValid.value = t('user.auth.passwordNotMin') return } - if (password.value.length > 250) { + if (props.validateMinLength && password.value.length > 250) { isValid.value = t('user.auth.passwordNotMax') return } diff --git a/frontend/src/views/user/Login.vue b/frontend/src/views/user/Login.vue index 742249b283..33809d4abd 100644 --- a/frontend/src/views/user/Login.vue +++ b/frontend/src/views/user/Login.vue @@ -66,6 +66,7 @@ v-model="password" tabindex="2" :validate-initially="validatePasswordInitially" + :validate-min-length="false" @submit="submit" />