\Nette\Utils\Validators::isUrl(http://x) == TRUE

Notice: This thread is very old.
pawouk
Member | 172
+
0
-

Maybe I'm wrong. But I think this is not true. Is it?

if(\Nette\Utils\Validators::isUrl('http://xxxx'))
	echo 'URL is valid';

Last edited by pawouk (2013-06-24 16:14)

Majkl578
Moderator | 1364
+
0
-

What about http://localhost/?

Patrik Votoček
Member | 2221
+
0
-

it is true

PetrP
Member | 587
+
0
-

It returns false for one character long “domain”. (Nette v2.0.12)

Nette\Utils\Validators::isUrl('http://l');

I'm not sure if it is bug or it's not valid url (by some rfc).