Limit the amount of characters that can be entered into input and textarea fields.
Not aware of a current work-around.
To enforce a character max length where using a counter is not feasible such as for single line text inputs.
It also helps to keep the user interface snappy and is nice to have because it can provide basic protection against bloating requests.
Thanks @johnleider
TODO: document this on https://vuetifyjs.com/en/components/text-fields#api
this feature works fine and i like it a lot, but i was unable to find this in the docs.
it can help more people if it is documented 😉
We are always looking for additional help with the documentation!
maxlength
is a built-in html attribute, it'd be retarded to list every single one of those in our documentation.
@KaelWD Perhaps you could add a note saying something along the lines of "all normal html tags are supported in a v-text-field" to remove confusion. Vue and Vuetify does so much that its not always obvious that you can.
Good idea, not a good repo ;) Please create issue in vuetiyjs.com repo
好主意,不是一个好的回购;)请在vuetiyjs.com回购中创建问题
为什么v-text-field type=number时 不支持maxlength属性
Because input[type="number"]
doesn't support it https://developer.mozilla.org/pl/docs/Web/HTML/Element/Input#attr-maxlength
you may use type="tel" instead of type="number"
Most helpful comment
@KaelWD Perhaps you could add a note saying something along the lines of "all normal html tags are supported in a v-text-field" to remove confusion. Vue and Vuetify does so much that its not always obvious that you can.