login form rules
This commit is contained in:
parent
0a61d2750b
commit
366339fc9a
1 changed files with 6 additions and 1 deletions
|
@ -8,12 +8,14 @@
|
||||||
<v-text-field
|
<v-text-field
|
||||||
ref="autofocus"
|
ref="autofocus"
|
||||||
v-model="login"
|
v-model="login"
|
||||||
|
:rules="loginRules"
|
||||||
label="User name"
|
label="User name"
|
||||||
required
|
required
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
|
|
||||||
<v-text-field
|
<v-text-field
|
||||||
v-model="password"
|
v-model="password"
|
||||||
|
:rules="passwordRules"
|
||||||
:append-icon="showPassword ? 'visibility' : 'visibility_off'"
|
:append-icon="showPassword ? 'visibility' : 'visibility_off'"
|
||||||
@click:append="showPassword = !showPassword"
|
@click:append="showPassword = !showPassword"
|
||||||
:type="showPassword ? 'text' : 'password'"
|
:type="showPassword ? 'text' : 'password'"
|
||||||
|
@ -38,8 +40,11 @@ export default {
|
||||||
|
|
||||||
data: () => ({
|
data: () => ({
|
||||||
login: '',
|
login: '',
|
||||||
|
loginRules: [v => !!v || 'Please enter user name'],
|
||||||
|
|
||||||
password: '',
|
password: '',
|
||||||
showPassword: false
|
showPassword: false,
|
||||||
|
passwordRules: [v => !!v || 'Please enter password'],
|
||||||
}),
|
}),
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
|
Reference in a new issue