validators/url.php
Go to the documentation of this file.
1 <?php
7 namespace depage\htmlform\validators;
8 
12 class url extends validator
13 {
21  public function validate($url, $parameters = array())
22  {
23  return (bool) filter_var($url, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED + FILTER_FLAG_HOST_REQUIRED);
24  }
25 }
validate($url, $parameters=array())
url validator
default validator for url input elements
parent validator class
Definition: validator.php:14