cv+preReady
This commit is contained in:
parent
472cfb763a
commit
dc18f41c9c
|
@ -85,6 +85,9 @@ class DreamjobCvEntry extends AppModel {
|
|||
//'last' => false, // Stop validation after this rule
|
||||
//'on' => 'create', // Limit validation to 'create' or 'update' operations
|
||||
),
|
||||
'compare' => array(
|
||||
'rule'=>'compareDates'
|
||||
)
|
||||
),
|
||||
'enddate' => 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
|
||||
|
||||
public function compareDates()
|
||||
{
|
||||
return ($this->data[$this->alias]['startdate'] < $this->data[$this->alias]['enddate']) ? true : false;
|
||||
}
|
||||
/**
|
||||
* belongsTo associations
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue