public function isValid($context = null) { if (!$this->hrefValidate()) { $this->setErrorMessage('Некорректный формат для ссылки'); return false; } return parent::isValid($context); }
public function isValid($context = null) { $name = $this->getName(); $result = parent::isValid($context); if (!preg_match($this->pattern, $context[$name])) { $this->setErrorMessage('Неверный формат номера: ' . $this->errorPattern); $result = false; } return $result; }