I am currently working on creating an SMS verification code component using a series of v-text-field components. My goal is to limit the input to just a single digit.
<v-text-field
v-for="(num, key) of code"
:key="key"
type="number"
outlined
v-model.number="num.char"
></v-text-field>
While searching for solutions, I came across suggestions to use props like maxlength
or pattern
, but these appear to be outdated answers for V1 of Vuetify. I am using the latest release of V2.
One potential solution involves hooking up a method to the @input
event to manually check the input. However, I feel like there may be a simpler solution that I am overlooking.