/**
  * @see sfValidatorString
  */
 protected function doClean($value)
 {
     $clean = parent::doClean($value);
     if (opToolkit::isMobileEmailAddress($clean)) {
         throw new sfValidatorError($this, 'invalid', array('value' => $value));
     }
     return $clean;
 }
 protected function doClean($value)
 {
     $clean = parent::doClean($value);
     $strongValidator = new RealEmailValidator();
     if ($strongValidator->validate($clean) === false) {
         throw new sfValidatorError($this, 'inexistant', array('value' => $value));
     }
     return $clean;
 }
 /**
  * @see sfValidatorBase
  */
 public function doClean($value)
 {
     if ($this->getOption('multiple') === false) {
         return parent::doClean($value);
     }
     $value = explode(',', $value);
     foreach ($value as $key => $email) {
         $value[$key] = parent::doClean($email);
     }
     return $value;
 }
Esempio n. 4
0
 /**
  * @see sfValidatorString
  */
 public function doClean($value)
 {
     $retVal = array();
     $valueError = array();
     $mails = explode($this->getOption('separator'), $value);
     foreach ($mails as $mail) {
         try {
             $retVal[] = parent::doClean(trim($mail));
         } catch (sfValidatorError $e) {
             $valueError[] = $e->getValue();
         }
     }
     if (!empty($valueError)) {
         throw new sfValidatorError($this, 'invalid', array('value' => implode(', ', $valueError)));
     }
     return $retVal;
 }
 protected function doClean($value)
 {
     $clean = trim(strtolower($value));
     return parent::doClean($clean);
 }