I know this is mundane guys but whats up with this, it was a huge
selling point for me when I was reading how it could work.  Is there a
resource that could outline the steps here?

On Jul 4, 1:58 pm, mwcbrent <[EMAIL PROTECTED]> wrote:
> I seem to be having a problem withvalidation.  Everything works great
> so far but when I have empty fields they still get saved.
>
> Model:
>
> class Girl extends AppModel
>   {
>     var $name = 'Girl';
>         var $validate = array(
>                 'description' => array(
>                         'rule' => array('minLength',1)
>                 )
>         );
>
>   }
>
> Controller:
>
> function admin_add()
>         {
>                 if(!empty($this->data)) {
>                         if($this->Girl->save($this->data)) {
>                                 $this->flash('Girl Has Been 
> Saved.','/admin/girls');
>                         } else {
>                                 $this->flash("Epic Fail","/admin/girls");
>                         }
>                 }
>         }
--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to