cv+preReady

This commit is contained in:
Martin Müller 2014-04-01 21:11:53 +02:00
parent 472cfb763a
commit dc18f41c9c
1 changed files with 7 additions and 1 deletions

View File

@ -85,6 +85,9 @@ class DreamjobCvEntry extends AppModel {
//'last' => false, // Stop validation after this rule //'last' => false, // Stop validation after this rule
//'on' => 'create', // Limit validation to 'create' or 'update' operations //'on' => 'create', // Limit validation to 'create' or 'update' operations
), ),
'compare' => array(
'rule'=>'compareDates'
)
), ),
'enddate' => array( 'enddate' => array(
'date' => array( 'date' => array(
@ -119,7 +122,10 @@ class DreamjobCvEntry extends AppModel {
); );
//The Associations below have been created with all possible keys, those that are not needed can be removed //The Associations below have been created with all possible keys, those that are not needed can be removed
public function compareDates()
{
return ($this->data[$this->alias]['startdate'] < $this->data[$this->alias]['enddate']) ? true : false;
}
/** /**
* belongsTo associations * belongsTo associations
* *