Reputation: 37
I'm working with a form done using Vuetify and my question is, how can I add a success attribute to the v-text-field
once the input
has been validated by the :rules
?
<v-text-field
v-model="halfPayment.month"
v-mask="'##'"
:rules="[$rules.required, $rules.minCharacters(2), $rules.between(1, 12)]"
label="month expired"
outlined
dense
:success=
background-color="white"
/>
Upvotes: 0
Views: 170
Reputation: 378
You can add
:success="!!halfPayment.month"
to the text field to show when it successfully passed the validation rules. I hope this helps, otherwise, you can just drop a comment!
Upvotes: 1