How to add maxLength on ion-input?

Member

irwin

by irwin , in category: Technology , 2 months ago

How to add maxLength on ion-input?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by sidney , 2 months 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>