I have noticed that this is a pain in the ass. The HTML5 validator with type="email" seems like it's not working in Ionic (View). I tried every possible way, but it's not working.
I am using:
Ionic (View)
Angular
HTML5
This is my HTML right now:
<input class="testinput" type="email" name="email"
ng-model="userRegistration.email" type="text"
pattern="/^[_a-z0-9]+(\.[_a-z0-9]+)*@[a-z0-9-]*\.([a-z]{2,4})$/"
required>
Also tried this with type="text"
, but also not working. I can just validate the form while I am using an e-mailadress like: "blablabla" where I don't use a @
symbol, which is wrong, of course.
What I also so tried, is: [a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,63}$
and ng-pattern
, yet I don't get an error and I can just register with random texts, without being stopped by the validators.
So my question is: how can I fix this? What is the best way to fix this?
I've checked: