Hi,

I have a form with two models (User & Consumer, Consumer belongs to
User) - my view looks like this:

echo $form->create('', array
('controller'=>'users','action'=>'first'));
echo $form->input('User.firstName', array('label' => 'First Name'));
echo $form->input('User.lastName', array('label' => 'Last Name'));
        // ...
echo $form->input('Consumer.id');
echo $form->input('Consumer.user_id', array('type' => 'hidden'));
echo $form->input('Consumer.address', array('label' => 'Adress'));
echo $form->end('Submit');

I want to save data from this form in my controller with saveAll like
this:

if ($this->User->saveAll($this->data)) {
// ok
} else {
// not ok
}

Now in general this works... The validation rules are all recognized,
BUT the validation error messages from User do not appear in the view.
Only Consumer is perfectly fine.

If I have a look at the validationErrors in the controller with:

debug($this->User->validationErrors);
debug($this->Consumer->validationErrors);

the messages from both models are there.

I searched a little bit around the Internet and found this ticket with
a similiar problem, but apparently this bug was fixed...
https://trac.cakephp.org/ticket/4561

Any ideas on this one?

Thanks!

tobi_one



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to