public function Validate() { $blnToReturn = parent::Validate(); // TODO: Validate relationship does not already exist // if (!$this->blnEditMode && // Relationship::) // $this->dtxDateStart->Warning = 'Cannot have an end date without a start date'; // $blnToReturn = false; // } return $blnToReturn; }
public function Validate() { return $this->objDelegate->Validate(parent::Validate()); }
public function Validate() { $blnToReturn = parent::Validate(); // Validate proper datetimes if ($this->dtxDateEnd->DateTime && $this->dtxDateEnd->DateTime->IsEarlierOrEqualTo($this->dtxDateStart->DateTime)) { $this->dtxDateEnd->Warning = 'Must be later than Membership Start Date'; $blnToReturn = false; } // Dates must be in the past (no future dates) if ($this->dtxDateStart->DateTime->IsLaterThan(QDateTime::Now())) { $this->dtxDateStart->Warning = 'Date cannot be in the future'; $blnToReturn = false; } // Dates must be in the past (no future dates) if ($this->dtxDateEnd->DateTime && $this->dtxDateEnd->DateTime->IsLaterThan(QDateTime::Now())) { $this->dtxDateEnd->Warning = 'Date cannot be in the future'; $blnToReturn = false; } return $blnToReturn; }
public function Validate() { $this->dlgMessage->HideDialogBox(); return parent::Validate(); }
public function Validate() { $blnToReturn = parent::Validate(); // Validate proper datetimes if ($this->dtxDateEnd->DateTime && !$this->dtxDateStart->DateTime) { $this->dtxDateStart->Warning = 'Cannot have an end date without a start date'; $blnToReturn = false; } // Validate proper datetimes if ($this->dtxDateEnd->DateTime && $this->dtxDateStart->DateTime && $this->dtxDateEnd->DateTime->IsEarlierOrEqualTo($this->dtxDateStart->DateTime)) { $this->dtxDateEnd->Warning = 'Must be later than Marriage Start Date'; $blnToReturn = false; } // Dates must be in the past (no future dates) if ($this->dtxDateStart->DateTime && $this->dtxDateStart->DateTime->IsLaterThan(QDateTime::Now())) { $this->dtxDateStart->Warning = 'Date cannot be in the future'; $blnToReturn = false; } // Dates must be in the past (no future dates) if ($this->dtxDateEnd->DateTime && $this->dtxDateEnd->DateTime->IsLaterThan(QDateTime::Now())) { $this->dtxDateEnd->Warning = 'Date cannot be in the future'; $blnToReturn = false; } // Any end date most not be a curent marriage if ($this->dtxDateEnd->DateTime && $this->lstStatus->SelectedValue == MarriageStatusType::Married) { $this->dtxDateEnd->Warning = 'Current marriages cannot have an end date'; $blnToReturn = false; } return $blnToReturn; }