$this->Somemodel->create();
if (!$this->Somemodel->save($data)) {
$errors = array_map(create_function('$key, $value', 'return $key.":".$value;'), array_keys($this->Somemodel->validationErrors), array_values($this->Somemodel->validationErrors));
echo ' - FAILED (rule: ' . implode(',', $errors) . ')';
}
Comments
Leave comment
Trackback