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
|
||||
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: {
|
||||
|
|
Reference in a new issue