I think this is related to the controller, and you need to implement
something like Multivalidatable (see:
http://bakery.cakephp.org/articles/view/multivalidatablebehavior-using-many-validation-rulesets-per-model)

I have this in my user_controller to deal with login, registration and
signup, which require different levels of validation. In my case, I
was having some problems with the Multivalidatable behavior on one of
my hosts, so I ended up coding the logic inside the controller
(basically pulled the behavior back into the controller). You can see
the code at
http://volunteercake.svn.sourceforge.net/viewvc/volunteercake/VolunteerCake/controllers/users_controller.php?view=markup


On Jan 4, 4:21 pm, "mariacheu...@gmail.com" <mariacheu...@gmail.com>
wrote:
> Hi Eddie,
> Thanks for your reply. However, my validation will check the username
> and password fields for length, to ensure they're not empty. So this
> is failing validation for the login sidebar, even though it wasn't
> submitted.
>
> Does anyone else have a register and login form on the same page, and
> have the validation working correctly??
>
> Thanks!
>
> On Jan 4, 11:40 pm, Smelly_Eddie <ollit...@gmail.com> wrote:
>
> > Maria:
>
> > You can simply limit validation to only occur if fields are present.
>
> > For example, a register page might have two password fields to
> > compare, while a login will only have one.
>
> > A register page might have email, or address while a login will not.
>
> > The article below explains how to perform such validation and is based
> > on a User model. it also includes tips on how to validate user names
> > and passwords for better security.
>
> >http://edwardawebb.com/programming/php-programming/cakephp/complex-va...
>
> > On Jan 3, 7:29 am, "mariacheu...@gmail.com" <mariacheu...@gmail.com>
> > wrote:
>
> > > They are both different forms, the register form is from a view and
> > > the login is part of a sidebar element. Both forms have different
> > > names too.
>
> > > Thanks for your reply!
>
> > > On Jan 3, 6:21 pm, Nature Lover <nature_lover1...@yahoo.co.in> wrote:
>
> > > > Hi!
>
> > > > Are the forms for both login and register differ.
> > > > or you have included the login element within the registration form?
>
> > > > thanks!
>
> > > > On Jan 1, 9:33 am, "mariacheu...@gmail.com" <mariacheu...@gmail.com>
> > > > wrote:
>
> > > > > Hi all,
> > > > > Apologies if this has been addressed before, but I've searched and
> > > > > can't find a thing.
>
> > > > > I have a register page, with a login element in the sidebar. The login
> > > > > element is on every page in the sidebar. When I try register with
> > > > > invalid data, the correct validation errors show for the register
> > > > > form. However, the errors are also showing on the login form, even
> > > > > though that hasn't been submitted. The login form is using jQuery Ajax
> > > > > to submit.
>
> > > > > Any ideas anyone?
>
> > > > > Thanks!
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to