I forgot to mention, check Snook's post about validation:
http://www.snook.ca/archives/php/cakephp_data_va_1/
On 6/30/06, Armando Sosa <[EMAIL PROTECTED]> wrote:
> You can add as many tagErrorMsg to your view even if don't exist in your
> model.
>
> ex:
>
> <?=$html->tagErrorMsg('Profile/passwordsDontMatch', 'Sorry, the
> passwords don\'t match');?>
>
> and in your controller:
>
> if (!$this->data['pass1']==$this->data['pass2']){
> $this->Model->invalidate('passwordsDontMatch');
> }
>
>
>
> On 6/30/06, Sam <[EMAIL PROTECTED]> wrote:
> >
> > I responded to gwoo directly with this:
> >
> > > I saw the first, hadn't seen the second, but here's my problem...
> > >
> > > Invalidating fields that don't exist in the model doesn't seem to do
> > > anything (and this doesn't seem to be addressed in either posting). I
> > > was pretty sure this was a syntax problem on my end, but I couldn't
> > > find what would make it work.So I guess what I am wondering with
> > > respect to invalidation is, can you invalidate fields that don't exist
> > > in the model and have that stop the save process? (Note that I have
> > > added code found in various places to support multi-condition
> > > validation.)
> > >
> > > Thanks.
> >
> > Gwoo then indicated that it's impossible to say without knowing the
> > implementation I used for the multi-condition validation. So, what I
> > did is implement cakebaker's code as illustrated in this post:
> >
> > http://cakebaker.wordpress.com/2006/02/06/yet-another-data-validation-approach/
> >
> > Of all the implementations I've seen, I liked this one the best. It
> > seems the most elegant and extensible without being particularly hacky
> > (in my limited-experience opinion).
> >
> >
> > > >
> >
>
>
> --
> Armando Sosa
>
> www.nolimit-studio.com
>
--
Armando Sosa
www.nolimit-studio.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake
PHP" 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
-~----------~----~----~----~------~----~------~--~---