/** * Extra validation for training disruptions to make sure the disruption date * is after the intake date of the training being disrupted. * */ protected function validate() { parent::validate(); if (I2CE_Validate::checkDate($this->getPrimary()->disruption_date) && $this->getPrimary()->disruption_date->before($this->getParent()->intake_date)) { $this->getPrimary()->setInvalidMessage("disruption_date", "bad_date"); } }
/** * Extra validation for training disruptions to make sure the disruption date * is after the intake date of the training being disrupted. * */ protected function validate() { parent::validate(); if ($this->isPost()) { if (!I2CE_Validate::checkDate($this->getPrimary()->resumption_date)) { $this->getPrimary()->setInvalidMessage("resumption_date", 'required'); } } }