62
62
$start_year = $proj->start_year->year();
63
63
$duration = $proj->duration;
64
64
$year = $this->year->year();
65
if ( !I2CE_Validate::checkNumber( $this->target, 0 ) && !I2CE_Validate::checkNumber( $this->ratio, 0 ) ) {
68
} elseif ( I2CE_Validate::checkNumber( $this->target, 0 ) && I2CE_Validate::checkNumber( $this->ratio, 0 ) ) {
69
$page->setFormInvalid( $this->getField( "ratio" )->getHTMLName(), "Please enter either a target number OR ratio, not both." );
70
$page->setFormInvalid( $this->getField( "target" )->getHTMLName(), "Please enter either a target number OR ratio, not both." );
65
72
if ( $year < $proj->start_year->year() || $year > $start_year+$duration ) {
66
73
$page->setFormInvalid( $this->getField( "year" )->getHTMLName(), "The year is outside the range for this projection." );