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

Notice: This thread is very old.

7 years ago

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)

7 years ago

Majkl578
Moderator | 1376
+
0
-

What about http://localhost/?

7 years ago

Patrik Votoček
Member | 2248
+
0
-

it is true

7 years ago

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).