Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229727

Touched on form controls not working as expected

$
0
0

Hi, after a recent update I have problem with form validation as the "touched" property does not work as expected.
For example:

Email


<div ngIf="email.hasError('required') && email.touched" class="error-box"> email is requred
<div ngIf="email.hasError('pattern') && email.touched" class="error-box"> invalid email

What happens is that the form control is marked as touched as soon as the user starts entering. Previously, it was required that the control looses focus before it is marked as touched. Any help please.


Viewing all articles
Browse latest Browse all 229727

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>