login form rules

This commit is contained in:
Jörn-Michael Miehe 2019-05-09 03:31:56 +02:00
parent 0a61d2750b
commit 366339fc9a

View file

@ -8,12 +8,14 @@
<v-text-field
ref="autofocus"
v-model="login"
:rules="loginRules"
label="User name"
required
></v-text-field>
<v-text-field
v-model="password"
:rules="passwordRules"
:append-icon="showPassword ? 'visibility' : 'visibility_off'"
@click:append="showPassword = !showPassword"
:type="showPassword ? 'text' : 'password'"
@ -38,8 +40,11 @@ export default {
data: () => ({
login: '',
loginRules: [v => !!v || 'Please enter user name'],
password: '',
showPassword: false
showPassword: false,
passwordRules: [v => !!v || 'Please enter password'],
}),
methods: {