Sorry, ignore me. I hadn't used $this->User->read() before trying to
save and this was causing the problem.
On Aug 19, 12:47 am, martinp <[EMAIL PROTECTED]> wrote:
> Hi - Been staring at this for a few hours now and can't see what the
> problem is.. maybe someone can help?
>
> Somehow my validationErrors are getting lost on their way from the
> controller to the view.
>
> I have a simple form:
> echo $form->create('Users.User', array('url' =>
> $this->here))."\n";
> echo $form->input('email', array('error' =>
> array('email' => 'Must
> be a valid email address')))."\n";
> echo $form->input('password', array('value' =>
> false))."\n";
> echo $form->input('confirm_password', array('value' =>
> false))."\n";
> echo $form->end(__('Save', true))."\n";
>
> Which is part of my "Users" plugin. If an incorrect email address is
> entered the record doesn't save, but no validation error message is
> shown.
>
> I can print the $this->User->validationErrors array in my controller
> and see the validationError that's set in the model, but nothing
> appears in the view.
>
> If I pr($this->validationErrors) in the view I have an empty array.
>
> Is there something I should be aware of when using plugins and
> validation? Extensive searching of this group etc hasn't found
> anything.
>
> For clarity, I have the following in my controller:
> var $name = 'Users';
> var $uses = 'Users.User';
>
> And the following in my model:
> var $name = 'Users.User';
> var $useTable = 'users';
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---