From 24e706d14badc1b482e38ca9ab4eb2df890d73ef Mon Sep 17 00:00:00 2001 From: sachinshilwal Date: Tue, 21 Mar 2023 11:56:41 +0545 Subject: [PATCH] fix: refactor validation error for password field in login form --- packages/vue-user/src/components/LoginForm.vue | 3 ++- packages/vue-user/src/locales/messages.json | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/packages/vue-user/src/components/LoginForm.vue b/packages/vue-user/src/components/LoginForm.vue index 2de5c2724..91aace4f4 100644 --- a/packages/vue-user/src/components/LoginForm.vue +++ b/packages/vue-user/src/components/LoginForm.vue @@ -15,9 +15,10 @@ v-model="credentials.password" :error-messages="{ required: t('user.login.form.password.errors.required'), + weak: t('user.login.form.password.errors.invalid'), }" :label="t('user.login.form.password.label')" - :options="{ minLength: 0 }" + :options="{ minLength: 8 }" />
diff --git a/packages/vue-user/src/locales/messages.json b/packages/vue-user/src/locales/messages.json index ad4532ba2..972a64e13 100644 --- a/packages/vue-user/src/locales/messages.json +++ b/packages/vue-user/src/locales/messages.json @@ -19,6 +19,7 @@ }, "password": { "errors": { + "invalid": "Your password should be at least 8 characters long", "required": "Please provide a password" }, "label": "Your password"