[eluser]johnmerlino[/eluser]
Hey all,
I read this in datamapper documentation:
Code:
If any of the field values fail validation, the object will have its error property populated. You can view loop through and show each error in the error's all list, show the specific error for each field, or show all errors in one string. For example:
foreach ($object->error->all as $e)
{
echo $e . "<br />";
}
Here's the problem. It doesn't tell you what is stored in the variable $object. If I have this in a Category model:
Code:
var $validation = array(
'controller' => array(
'label' => 'Enter Category Name',
'rules' => array('required','min_length' => 5, 'max_length' => 10, 'alpha_dash')
)
);
And my new method of categories controller just does a get to render a form, I am not sure what it wants that $object variable to store in it.
Thanks for response.