Reactive forms validation touched fires too early

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

Hi @seevoovapp, any news about this ? Same problem here …

Not yet, unfortunately

This issue is now solved.

@jeba would probably appreciate some insight as to how the issue was solved

I didn’t do anything to fix it, so I guess it was fixed in one of Angular’s or Ionic’s versions.

Thx for the quote :slight_smile: