验证没有FILTER_VALIDATE_URL的URL

I am toying with validations and all is going swell except I am not really liking the FILTER_VALIDATE_URL PHP filter, or I am not using it correctly. This type of input will validate:

www.mysite (notice no .com)

I would like for this to work:

www.mysite.com

mysite.com

Here is the code I am using now..

if (empty($web)) {
$webError = '<p class="error">Website Is Required</p>';
}

else if (filter_var($web, FILTER_VALIDATE_URL) === FALSE) {
$webError = '<p class="error">Please Enter A Valid URL</p>';
}

Off course, only single error message will be shown, because you each time override the string. And you're approaching it all wrong. You need some kind of error container in order to store them. Then if it has errors, show them in HTML markup. Your code could look like this,

$errors = array();

if (empty($web)) { 
   array_push($errors, 'Website Is Required');

} elseif (filter_var($web, FILTER_VALIDATE_URL) === false) {

   array_push($errors, 'Please Enter A Valid URL');
}

?>

<?php if (!empty($errors)) : ?>
<?php foreach($errors as $error): ?>

<p class="error"><?php echo $error; ?></p>

<?php endforeach; ?>
<?php endif; ?>