Vue js, Restrict Length of <input /> I wanted to create a client side validation where it can detect the input value length and stop accept any input once it reach a length of 4.
I google a lot but mostly are jquery related, is there anyway to do it using vue?
@REALRANDYALLEN - I was looking for a full vue.js solution, rather than a html. But still thanks for you info.
@EEETM - I saw this earlier, it's using vue assigned value to the html maxlength attribute, what i was looking is full vue.js solution, Thanks thou!
Would a simple filter do? Or you could use a watcher on the value and just trim the length? Either that or bind the value and input events separately and do it in the event handler I guess.
<input v-validate="'length:4'" type="text" name="field">
Please sign in or create an account to participate in this conversation.