/** * Check if the URI is a valid File URI * * This applies additional specific validation rules beyond the ones * required by the generic URI syntax. * * @return boolean * @see Uri::isValid() */ public function isValid() { if ($this->query) { return false; } return parent::isValid(); }
public function isValid($value) { if (!parent::isValid($value)) { return false; } $keys = array('Protocol', 'Username', 'Password', 'Domain', 'Tld', 'Port', 'Path', 'Anchor'); foreach ($keys as $key) { $method = "get" . $key; if (!$this->validate($key, $this->URI->{$method}())) { $key = 'invalid' . $key; $this->error($key, $value); } } if ($this->hasMessages()) { return false; } return true; }
/** * Check if the URI is a valid HTTP URI * * This applys additional HTTP specific validation rules beyond the ones * required by the generic URI syntax * * @return boolean * @see Uri::isValid() */ public function isValid() { return parent::isValid(); }