booked/lib/Application/Reservation/Validation/ReminderValidationRule.php
/**
	 * @param ReservationSeries $reservationSeries
	 * @param $retryParameters
	 * @return ReservationRuleResult
	 */
@param ReservationSeries $reservationSeries
@param $retryParameters
@return ReservationRuleResult
@param ReservationSeries $reservationSeries @param $retryParameters @return ReservationRuleResult
public function Validate($reservationSeries, $retryParameters)
	{
		$errorMessage = new StringBuilder();
		if ($reservationSeries->GetStartReminder()->Enabled())
		{
			if (!$this->minutesValid($reservationSeries->GetStartReminder()))
			{
				$errorMessage->AppendLine(Resources::GetInstance()->GetString('InvalidStartReminderTime'));
			}
		}
		if ($reservationSeries->GetEndReminder()->Enabled())
		{
			if (!$this->minutesValid($reservationSeries->GetEndReminder()))
			{
				$errorMessage->AppendLine(Resources::GetInstance()->GetString('InvalidEndReminderTime'));
			}
		}
		$message = $errorMessage->ToString();
		if (strlen($message) > 0)
		{
			return new ReservationRuleResult(false, $message);
		}
		return new ReservationRuleResult();
	}
public function Validate ( $ reservationSeries , $ retryParameters ) { $ errorMessage = new StringBuilder ( ) ; if ( $ reservationSeries -> GetStartReminder ( ) -> Enabled ( ) ) { if ( ! $ this -> minutesValid ( $ reservationSeries -> GetStartReminder ( ) ) ) { $ errorMessage -> AppendLine ( Resources :: GetInstance ( ) -> GetString ( 'InvalidStartReminderTime' ) ) ; } } if ( $ reservationSeries -> GetEndReminder ( ) -> Enabled ( ) ) { if ( ! $ this -> minutesValid ( $ reservationSeries -> GetEndReminder ( ) ) ) { $ errorMessage -> AppendLine ( Resources :: GetInstance ( ) -> GetString ( 'InvalidEndReminderTime' ) ) ; } } $ message = $ errorMessage -> ToString ( ) ; if ( strlen ( $ message ) > 0 ) { return new ReservationRuleResult ( false , $ message ) ; } return new ReservationRuleResult ( ) ; }
@param ReservationSeries $reservationSeries
 @param $retryParameters
 @return ReservationRuleResult
@param ReservationSeries $reservationSeries @param $retryParameters @return ReservationRuleResult