ionic 3 validation border not showing on ios

Viewed 1950

I am using ionic3 to create a login page, with form validation. When I run the application for android and browser platform, validation gets displayed with red color bottom border. but for ios platform it is not showing red colored border at the bottom. what I am missing?

Refer the screen shotScreenshot of ios platform- not shwing red border secreenshot of android platfor- showing red border

3 Answers

you can add css classes if the input is invalid and not touched:

ion-item.ng-invalid.ng-touched{
       border-bottom: 1px solid map-get($colors, danger) !important;
   }

Well the following worked for me for iOS:

//-- Validation failed
ion-item.ion-invalid.ion-dirty{
       border-bottom: 2px solid var(--ion-color-danger) !important;
}

//-- Validation passed
ion-item.ion-valid.ion-dirty{
    border-bottom: 2px solid var(--ion-color-success) !important;
}

Related