protected function _doClean($value) { $clean = parent::_doClean($value); if ($pattern = $this->getPattern()) { if (!preg_match($pattern, $clean)) { throw new YValidatorException($this->getMessage('pattern')); } } return $clean; }