By kendre_paresh on
Hello All,
I have to validate the URL, am using the "valid_url" API from DRUPAL.
if (valid_url($webURL)) {
$message = "Invalid Web URL";
form_set_error('url', $message);
}
If i try http://yahoo.com it shows me error, whereas its valid URL.
I think this is not working for me.
Please tell me, how i have to invoke, or am wrong somewhere?
Comments
The valid_url function
The valid_url function checks for both absolute and relative URLs - and it defaults to relative.
Please update you code to
Paddy.
http://deburca.org, and http://amadain.net
Paddy.
http://deburca.org
your link is busted
probably because the comment is from 3 years ago...
the right link:
http://api.drupal.org/api/drupal/includes--common.inc/function/valid_url/6
-trevor