On Sat, May 22, 2010 at 4:14 PM, 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

Reply via email to