url validator only allows hostnames with TLD or internal IP (was: url validator only allows hostnames with TLD)
The builtin url validator always assumes a valid URL to have a top-level-domain (TLD). While this is the case for hosts in the internet, it is very common to have host names without TLD in an intranet. Taking the original RFCs into account, this would also be correct (RFC 1738 for URLs references RFC 1034 regarding valid domain names).
Fiddle: https://jsfiddle.net/b5v4faqf/2897/
When viewing the fiddle, just look at the output value of url. It's true for the URL with TLD and false for the one without.
EDIT: I just tried an IP address from our LAN instead of a host name and it wasn't accepted as well. Here is an updated fiddle: https://jsfiddle.net/b5v4faqf/2898/
+1 on this one... Considering this is from 2018, is this ever going to be improved?