bug: ion-item don't changes ion-untouched to ion-touched on form markAllAsTouched();
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
Current Behavior
ion-item class="ion-untouched ion-pristine ion-invalid item-interactive item-input item ios item-fill-none in-list hydrated item-label item-label-floating"
Expected Behavior
After form submitting i use markAllAsTouched()
in previous versions it worked well
ion-item class="ion-touched ion-pristine ion-invalid item-interactive item-input item ios item-fill-none in-list hydrated item-label item-label-floating"
Steps to Reproduce
just place ion-item with ion-input inside form element
Code Reproduction URL
Ionic Info
Ionic:
Ionic CLI : 6.18.1 (....../.nvm/versions/node/v16.13.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.0.1
@angular-devkit/build-angular : 13.1.2
@angular-devkit/schematics : 13.1.2
@angular/cli : 13.1.2
@ionic/angular-toolkit : 5.0.3
Capacitor:
Capacitor CLI : 3.3.3
@capacitor/android : 3.3.3
@capacitor/core : 3.3.3
@capacitor/ios : 3.3.3
Utility:
cordova-res : 0.15.4
native-run : not installed globally
System:
NodeJS : v16.13.0 (....../.nvm/versions/node/v16.13.0/bin/node)
npm : 8.1.4
OS : macOS Monterey
Additional Information
No response
Issue Analytics
- State:
- Created 2 years ago
- Reactions:3
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Reactive Forms - mark fields as touched - Stack Overflow
The main problem is that if I do not touch fields and try to submit form - validation error in not shown up....
Read more >Best Way To Use markAllAsTouched in Angular Forms
Working with the angular reactive form you must have an encounter with markAsTouched() or markAllAsTouched() of the reactive forms.
Read more >AbstractControl - Angular
Marks the control as touched . A control is touched by focus and blur events that do not change the value. See also:...
Read more >Quick Tip for Angular Forms: Keep your markAllAsTouched DRY
Working with Angular Forms validation you've probably used the following code in ... And in each submit handler you've called markAllAsTouched() to cover ......
Read more >Angular Reactive Forms: trigger validation on submit
We also do not display any validation error message. ... constructor(private formBuilder: FormBuilder) {} ngOnInit() { this.form = this.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’m experiencing the same issue after updating to Ionic 6 today.
Thanks for reporting this issue 👍 I’ve created a reproduction app to help test the end solution.
https://github.com/sean-perkins/gh-24483-form-touched