I have an array of errors when I manually validate form:
$this->CalculationElement->set($this->request->data);
if($this->CalculationElement->validates()){
WHEN OK...
}else{
debug($this->CalculationElement->invalidFields());
die;
}
So, with ->invalidFields() I get array of errors… How can I display them at the bottom of the inputs just like CakePHP does it on $this->Model->save();?
I can $this->Model->set() them, but that’s, again, just an array of errors in VIEW.
Try this code: