Skip to content

Commit

Permalink
Changed input validation on login form to passive
Browse files Browse the repository at this point in the history
Fixes #585

In BValidatedInputGroupFormInput mode of validation-provider will automatically fallback to default mode 'aggressive' if no mode is specified.

Signed-off-by: Nikemare <[email protected]>
  • Loading branch information
Nikemare committed Oct 16, 2023
1 parent dc9dec4 commit b840950
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/forms/BValidatedInputGroupFormInput.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<validation-provider :vid="id" :name="label" :rules="rules" v-slot="{ errors, valid }">
<validation-provider :vid="id" :name="label" :rules="rules" :mode="mode" v-slot="{ errors, valid }">
<b-form-group :id="id" :label="label" :label-for="`${id}-input`">
<b-input-group :class="inputGroupSize">
<b-input-group-prepend v-if="icon"><b-input-group-text><i :class="icon"></i></b-input-group-text></b-input-group-prepend>
Expand Down Expand Up @@ -39,6 +39,7 @@
inputGroupSize: String,
icon: String,
rules: String,
mode: String,
type: String,
autocomplete: String,
autofocus: String,
Expand Down
2 changes: 2 additions & 0 deletions src/views/pages/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
:label="$t('message.username')"
input-group-size="mb-3"
rules="required"
mode="passive"
icon="icon-user"
type="text"
autocomplete="username email"
Expand All @@ -28,6 +29,7 @@
:label="$t('message.password')"
input-group-size="mb-3"
rules="required"
mode="passive"
icon="icon-lock"
type="password"
autcomplete="currentpassword"
Expand Down

0 comments on commit b840950

Please sign in to comment.