so if i have the following validation rule in my Forward
model
public $validate = array(
'url' =>array(
'rule' => 'url',
'message' => 'Please supply a valid Url.'
)
);
and i want to display the message in a flash how do i achieve that?
I have tried the following:
$new_forward = $this->request->data;
$this->Forward->create();
$this->Session->setFlash($this->Forward->save($new_forward));
Also tried this with no result
$this->Session->setFlash($this->ModelName->validationErrors);