How to add maxLength on ion-input?

Member

by irwin , in category: Technology , 3 years ago

How to add maxLength on ion-input?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by sidney , 3 years ago

Use Html5 maxlength property to add maxLength on ion-input.


Example

<ion-content padding>

  <ion-list>

    <ion-item>

      <ion-label color="primary" stacked>Stacked Label</ion-label>

      <ion-input type="text" maxlength="4" placeholder="Password Input"></ion-input>

    </ion-item>

  </ion-list>

</ion-content>