Tuesday, May 28, 2013

Re: $this->Modelname->validator()->add(); works, but shows no messages in view

Thanks for your reaction! I tried it different ways, but it still isn't working.

I have this in my controller:
$this->$slug->validator()->add('name', array(
     'notEmpty' => array(
          'rule' => 'notEmpty',
          'message' => 'Vul dit veld in'
     ),
));

I added a screenshot I took from google chrome inspector. There you see my Form start (which I made with $this->Form->Create('Newsitem');) and my input, which is named 'name'.

I don't see what I'm doing wrong, maybe you or someone else sees it :-)

--
Like Us on FaceBook https://www.facebook.com/CakePHP
Find us on Twitter http://twitter.com/CakePHP
 
---
You received this message because you are subscribed to the Google Groups "CakePHP" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cake-php+unsubscribe@googlegroups.com.
To post to this group, send email to cake-php@googlegroups.com.
Visit this group at http://groups.google.com/group/cake-php?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments: