Skip to content

Commit

Permalink
fix: refactor validation error for password field in login form
Browse files Browse the repository at this point in the history
  • Loading branch information
sachinshilwal committed Mar 21, 2023
1 parent 9e81ea8 commit 24e706d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/vue-user/src/components/LoginForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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 }"
/>

<div class="actions">
Expand Down
1 change: 1 addition & 0 deletions packages/vue-user/src/locales/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
},
"password": {
"errors": {
"invalid": "Your password should be at least 8 characters long",
"required": "Please provide a password"
},
"label": "Your password"
Expand Down

0 comments on commit 24e706d

Please sign in to comment.