Hi, I am trying to do some nice validation for my forms. I am using reactive forms, and my code works as expected in an angular project. This is the (simplified) code:
<ion-label *ngIf=form.controls['email'].hasError('required') && form.controls['email'].touched"> You must include an email </ion-label>
The problem is that the touched event becomes true as soon as I write something in the input.
Can anyone advice on it?
Also, this topic was asked before here: Form Validation - FormControl touched being set immediately on focus