You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[V4.Beta-13] Input validation highlight isn't working #16052
When the field form get invalid the line color below the field didn't change.
Expected Behavior
The line color maybe changed to red or green depends on the field form status.
This feature has been implemented in #14036 but doesn't work properly.
Reacted by zer09, Brandy Smith, ziwenzhao, Joel, David Villamizar, Edoardo Tassinari, João Vitor Paes de Barros do Carmo, Matthew Valenti, Dylan v.d Merwe, ZerozAndOnes and 2 more
Hi all. I'm having an issue with reactive forms + ionic v4.0.0-beta13 -
I don't know why, but there is a red border that is added to the ion-input element when an ion-input email gets invalid. I can't figure out with inspector which property is that. been doing that for 1h now, and still can't find...
EDIT: it happens with mozilla firefox 63.0 - doesnt happen with chrome... :(
Pls help?
Thanks
mine also only happens with firefox - quick solution: change ion input type to "text"
it happens only with ion-input type = email
my validation is on the reactive forms...
cheers
The underline color does not change for me when ion-inputs are invalid. I'm using both number and text input types. For me it fails in both Chrome and Firefox.
We haven't been able to make angular reactive forms error highlighting work in any browser. We've just upgraded to beta.16 and nothing seems to have changed.
When an error is assigned to a form control, ion-input elements get ion-invalid and ng-invalid classes, but the highlight color doesn't change.
It seems like this is the code that should highlight the inputs when invalid, but this code only applies to ion-item elements. The problem is that ion-invalid class is being set on the inner ion-input, not on the ion-item.
Hello everyone, I upgrade my ionic to 4.0.0 today, and the bottom border is working on browser. However, it is still not working on iOS mode. I tried on my iPhone and chrome mobile mode, both are does not show error colour on the border. Need some help, thanks
hi, on ionic 4.0.0 i'm experiencing an issue on desktop browsers (chrome and firefox) with default options like described above in the bug report.
If the input has a validation, e.g. required and maxlength(3), than on focus the bottom border becomes red (invalid), after typing turns green (valid). Even an input with no validation on focus it changes to green (valid).
In both cases never turns blue (on focus). The behavior shouldn't be when on focus the bottom border turns blue and when the input parameter touched becomes true it implements the validation?
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.
Activity
diver2 commentedon Oct 30, 2018
Hi all. I'm having an issue with reactive forms + ionic v4.0.0-beta13 -
I don't know why, but there is a red border that is added to the ion-input element when an ion-input email gets invalid. I can't figure out with inspector which property is that. been doing that for 1h now, and still can't find...
EDIT: it happens with mozilla firefox 63.0 - doesnt happen with chrome... :(
Pls help?
Thanks
diver2 commentedon Oct 30, 2018
it does not happen with ion-input password field (and it also has validation rules)
orochies commentedon Oct 30, 2018
I have the same behavior with firefox v63, not with chrome, a red border when the reactive form
[Edited]
In firefox v63 shadow dom is enabled:
Go in about:config to:
dom.webcomponents.shadowdom.enabled
When I change to false, everything works correctly, any suggestions because this happens?
diver2 commentedon Oct 31, 2018
mine also only happens with firefox - quick solution: change ion input type to "text"
it happens only with ion-input type = email
my validation is on the reactive forms...
cheers
wiggitamoo commentedon Nov 5, 2018
The underline color does not change for me when ion-inputs are invalid. I'm using both number and text input types. For me it fails in both Chrome and Firefox.
Chrome Version 70.0.3538.77 (Official Build) (64-bit)
Firefox 63.0.1 (64-bit)
@ionic/angular: "^4.0.0-beta.13"
jonmikelm commentedon Nov 26, 2018
We haven't been able to make angular reactive forms error highlighting work in any browser. We've just upgraded to beta.16 and nothing seems to have changed.
When an error is assigned to a form control,
ion-inputelements getion-invalidandng-invalidclasses, but the highlight color doesn't change.From debugger:
Looking at ionic core code,
itemcomponent's main scss file contains these lines:https://github.com/ionic-team/ionic/blob/master/core/src/components/item/item.scss
It seems like this is the code that should highlight the inputs when invalid, but this code only applies to
ion-itemelements. The problem is thation-invalidclass is being set on the innerion-input, not on theion-item.rosunad commentedon Dec 5, 2018
Upgraded to beta.17 and nothing seems to have changed. ion-input has ion-invalid and ng-invalid but style not applied.
Do we have any news?
ZerozAndOnes commentedon Jan 11, 2019
A simple workaround:
<ion-item [class.ion-invalid]="username.hasError('required')">Thanks to @jonmikelm , This works because the --highlight-background variable is updated when ion-item has the class ion-invalid.
fix(angular): apply validation classes properly
jakechen0816 commentedon Jan 24, 2019
Hello everyone, I upgrade my ionic to 4.0.0 today, and the bottom border is working on browser. However, it is still not working on iOS mode. I tried on my iPhone and chrome mobile mode, both are does not show error colour on the border. Need some help, thanks
victorS365 commentedon Jan 24, 2019
Fixed only for browser and android, on IOS still the same problem.
hugovisk commentedon Jan 24, 2019
hi, on ionic 4.0.0 i'm experiencing an issue on desktop browsers (chrome and firefox) with default options like described above in the bug report.
If the input has a validation, e.g. required and maxlength(3), than on focus the bottom border becomes red (invalid), after typing turns green (valid). Even an input with no validation on focus it changes to green (valid).
In both cases never turns blue (on focus). The behavior shouldn't be when on focus the bottom border turns blue and when the input parameter touched becomes true it implements the validation?
ionitron-bot commentedon Feb 23, 2019
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.