/** * @see sfValidatorBase */ protected function doClean($value) { $value = parent::doClean($value); $timestamp = strtotime($value); $day = date("D", $timestamp); foreach ($this->getOption('invalid_days') as $day_string => $day_code) { if (strcmp($day, $day_code) == 0) { throw new sfValidatorError($this, 'invalid_day', array('values' => $this->getDaysString())); } } return $value; }
/** * @see sfValidatorBase */ protected function doClean($value) { $date_validator = new mtValidatorDateString(); $time_validator = new alValidatorTimepicker(); return $date_validator->clean($value['date']) . ' ' . $time_validator->clean($value['time']); }