/** * Validate the data of the current record. * * @return boolean True for valid. */ public function recordValidate() { if (!$this->_validate->validateDateRange($this->startDate, $this->endDate)) { return false; } else { return parent::recordValidate(); } }
/** * Validate the data of the current record. * * @return boolean True for valid. */ public function recordValidate() { // one is the unique value available because calendar is a global module if (Phprojekt_Module::getSaveType(Phprojekt_Module::getId($this->getModelName())) >= 1) { $this->projectId = 1; } if (strtotime($this->startDatetime) >= strtotime($this->endDatetime)) { $this->_validate->error->addError(array('field' => "Event duration", 'label' => Phprojekt::getInstance()->translate('Event duration'), 'message' => Phprojekt::getInstance()->translate('End date and time has to be after Start date and ' . 'time'))); return false; } return parent::recordValidate(); }
/** * Validate the data of the current record. * * @return boolean True for valid. */ public function recordValidate() { if (strtotime($this->startDatetime) >= strtotime($this->endDatetime)) { $this->_validate->error->addError(array('field' => "Event duration", 'label' => Phprojekt::getInstance()->translate('Event duration'), 'message' => Phprojekt::getInstance()->translate('End date and time has to be after Start date and ' . 'time'))); return false; } return parent::recordValidate(); }
public function recordValidate() { return parent::recordValidate() && $this->_validateFilenamesAreUnique(); }