-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[V4.Beta-13] Input validation highlight isn't working #16052
Comments
Hi all. I'm having an issue with reactive forms + ionic v4.0.0-beta13 - |
it does not happen with ion-input password field (and it also has validation rules) |
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: When I change to false, everything works correctly, any suggestions because this happens? |
mine also only happens with firefox - quick solution: change ion input type to "text" |
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) |
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, From debugger:
Looking at ionic core code, 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 |
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? |
same issue on beta 17 |
workaround: .invalidItem { |
A simple workaround:
Thanks to @jonmikelm , This works because the --highlight-background variable is updated when ion-item has the class ion-invalid. |
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 |
Fixed only for browser and android, on IOS still the same problem. |
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. |
Bug Report
Ionic Info
Describe the Bug
The border color doesn't change when the field form is invalid.
Steps to Reproduce
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.
The text was updated successfully, but these errors were encountered: