ng2-validation
ng2-validation copied to clipboard
Validating URLs with an underscore in the subdomain.
Currently, the URL parsing fails for any URL that includes a subdomain with an underscore. For example:
my_domain.scott.com
This isn't a completely straightforward issue, because technically underscores in subdomains aren't standards compliant -- even if it's used and tends to work in every browser.
@yuyang041060120 Would you accept a pull request to allow for underscores in the subdomain?
The regex seems pretty restrictive in what it allows :(
http://localhost:11795/
for example is not considered a valid URL, neither would http://machinename/
be.
telnet://whatever.com/
wouldn't be considered a valid URL either since the regex seems to restrict the protocol to http/s and ftp.
localhost should be added. I'm running into a situation where I need this.