Good morning all:
Looks like a very common question, but after googling for hours I am not able to figure this out: how to validate an URL including www
without http
.
These is what I did:
- Used the input type url: it does not accept
www.google.com
; - Changed the input type to
text
and usedng-pattern
: I still get thewww.google.com
invalid; - Changed different regex but still not working.
So when I click on the submit button, I show an alert if the form is invalid (true invalid, false valid). Here is my Plunker
Thanks for the help