Input text size does not work. How can I make it work?

As shown in the sample code below, I’d like to limit the number of characters for the ‘First Name’ input field to 10 characters.

But, it does not work. Why? and How can I make it work?


< div class="list">
    < label class="item item-input">
         < input type="text" size="10" placeholder="First Name"/>
     < /label>
< /div>

Hi @mtWinds
Try adding attribute to inputbox - maxlength=‘10’

maxlength=‘10’ works. Thank you for the solution.

So, my code looks like below, and it limits input of 'First Name" to 10 characters maximum.


< div class="list">
    < label class="item item-input">
         < input type="text" maxlength="10" placeholder="First Name"/>
     < /label>
< /div>