In cakePHP how would you achieve date validation when placing your validation statement inside the controller. could I put a second if statement after the first validation statement? i am not sure how you’d make it validate as systemdate is before or equal to the expiry date
if($this->Invoice->validates(array('fieldList'=>array('Relationship.partyone','Relationship.active'))))
{
$this->Invoice->create();
if ($this->Invoice->saveAll($this->request->data,array('validate'=>false)))
{
$this->Session->setFlash('The invoice has been saved');
Probably you need custom validation for date date comparison
In Model
In Controller