I tried to rename the model and everything associated with it and that didn't work.
I scrapped the model, controller, views, table ... everything. I started all over again with it (I let the console create everything) and still have the same problem. Everything happens (or don't happen) for a reason and I must be missing something somewhere that's causing this ... feels like a really messed up game of Where's Waldo 8-) Anyhow, as much I hate to and really shouldn't have to, I'm going to concede and manually pull the errors out of the array for the sake of progress and my own sanity. If anyone has any other ideas I'm all ears. - Ed On Sat, May 22, 2010 at 11:29 AM, Ed Propsner <[email protected]> wrote: > @Matteo, > > I've looked through all the materials and I did try a few things but it > still don't work. > > I'm actually going to trash the model and everything associated with it and > start over and see what I get then. > > It's an extreme solution but I've tried everything I could think of to no > avail. It makes little sense. > > > On Sat, May 22, 2010 at 10:14 AM, Matteo <[email protected]> wrote: > >> Hi, >> >> you could try this: >> >> http://cakeqs.org/eng/questions/view/validation_summary >> >> there are many posts about validation under cakephp questions, I would >> check there too if you already didn't. >> >> Then lastly I would try changing model name and check if validation >> behaves correctly. >> >> Hope it helps. >> >> Matteo >> >> On May 22, 10:22 am, Ed Propsner <[email protected]> wrote: >> > @Master Ram >> > >> > I appreciate the advice but doesn't this seem a bit long winded for >> > something that normally requires no code at all besides the validation >> rules >> > in the model? >> > >> > if ($form->isFieldError('Model_name.Field_name')){ >> > >> > e($form->error('Model_name.Field_name', >> > null, >> > array( >> > 'class' => 'failure') >> > )); >> > } >> > >> > What if you have a form with say 20 fields that need to be validated? >> > >> > There is reason the validation errors are not outputting to the page, >> > instead of a work around I'd be more interested in finding the cause to >> the >> > problem. >> > >> > @Matteo, >> > >> > Thanks, I looked it over but nothing seemed to apply. >> > >> > >> > >> > >> > >> > On Sat, May 22, 2010 at 4:04 AM, Matteo <[email protected]> wrote: >> > > Hi, >> > >> > > you can check my post here and see if it - maybe - fits your needs. >> > > Please, see last reply. >> > >> > >http://groups.google.com/group/cake-php/browse_thread/thread/2f6a264d. >> .. >> > >> > > Matteo >> > >> > > On May 22, 8:50 am, Ed Propsner <[email protected]> wrote: >> > > > I have a form that is not displaying validation errors like it >> should be. >> > > > The errors are there in the validationErrors array so the model is >> > > > validating, I'm sure of that. >> > > > I've been reading through a few other threads on the same subject >> but >> > > none >> > > > of the causes seem to apply. >> > >> > > > I have the controller and the model stripped down to next to >> nothing. >> > >> > > > [controller] >> > >> > > > function add() >> > > > { >> > > > if(!empty($this->data)) >> > > > { >> > > > $this->data['ProfileAttrib']['user_id'] = $this->Auth->User('id'); >> > > > $this->ProfileAttrib->save($this->data); >> > >> > > > } >> > > > } >> > >> > > > [/controller] >> > >> > > > Then in the model I validate field 'gender' >> > >> > > > [model] >> > >> > > > class ProfileAttrib extends AppModel >> > > > { >> > >> > > > var $name = 'ProfileAttrib'; >> > >> > > > var $validate = array( >> > > > 'gender' => array( >> > > > 'rule' => 'notEmpty', >> > > > 'message' => 'Message here' >> > > > ) >> > > > ); >> > >> > > > } >> > >> > > > [/model] >> > >> > > > I also stripped down the view to just a form and a single field for >> > > gender. >> > > > Whatever the reason is that validation messages aren't displaying >> I'm >> > > really >> > > > not seeing it. >> > > > I can't strip things down any more than what they are now. >> > >> > > > Any advice? >> > >> > > > - Ed >> > >> > > > Check out the new CakePHP Questions sitehttp://cakeqs.organdhelp >> others >> > > with their CakePHP related questions. >> > >> > > > 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]<cake-php%[email protected]> >> <cake-php%[email protected] om>For more options, visit this >> group athttp:// >> > > groups.google.com/group/cake-php?hl=en >> > >> > > Check out the new CakePHP Questions sitehttp://cakeqs.organd help >> others >> > > with their CakePHP related questions. >> > >> > > 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]<cake-php%[email protected]> >> <cake-php%[email protected] om>For more options, visit this >> group at >> > >http://groups.google.com/group/cake-php?hl=en >> > >> > Check out the new CakePHP Questions sitehttp://cakeqs.organd help others >> with their CakePHP related questions. >> > >> > 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]<cake-php%[email protected]>For >> > more options, visit this group athttp:// >> groups.google.com/group/cake-php?hl=en >> >> Check out the new CakePHP Questions site http://cakeqs.org and help >> others with their CakePHP related questions. >> >> 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]<cake-php%[email protected]>For >> more options, visit this group at >> http://groups.google.com/group/cake-php?hl=en >> > > Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. 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
