Ionic4 ion-textarea maxlength attribute not working in device

Hi,
Actually in ionic 4 input fields like ion-input / ion-text area maxlength attribute does not working in device but it was working in browser view. :roll_eyes: . please help to find out the issue.

Here is my code :

<ion-textarea type=“text” maxlength=“256” style=“border: 1px solid;”
(ngModelChange)=“Change($event)” [(ngModel)]=“text”>

Thanks

Hi,
Did you manage to fix this or you wrote on your own?

<ion-textarea [(ngModel)]=“text” (ionChange)=“textareaMaxLengthValidation()”>

<ion-input type=“text” [(ngModel)]=“text” (ionChange)=“textareaMaxLengthValidation()”>

textareaMaxLengthValidation() {
if (text.length > 50) {
text= text.slice(0, 50);
}
}