Check model filename - it should be lowercased. If your model is not
loaded you'll note absence of validation rules.

On Mar 16, 7:57 am, SeeVik <vikramvmalhotra1...@gmail.com> wrote:
> Hello there Lucca
>
> I double checked the server database. Its the same as local database.
> Since I am doing this application for test, there is only one table,
> not much room for error.
>
> Any other ideas as to how I can isolate the problem?
>
> Thanks and Regards
> ShiVik
>
> On Mar 15, 6:51 pm, Lucca Mordente <luccamorde...@gmail.com> wrote:
>
>
>
> > Probably there is an error at database level. Make sure your server
> > table structure and constraints are the same of your local machine.
>
> > On 15 mar, 01:20, SeeVik <vikramvmalhotra1...@gmail.com> wrote:
>
> > > Hello all
>
> > > I am using CakePHP 1.2 and I am trying to implement a simple form data
> > > validation. The thing is that the data validation works on my local
> > > machine but it doesn't work on my rental server (Linux FreeBSD
> > > server).
>
> > > Here's my model....
> > > <?php
> > > class Inventory extends AppModel
> > > {
> > >     var $name = 'Inventory';
> > >     var $validate = array(
> > >         'make' => array(
> > >             'rule'      => 'notEmpty',
> > >             'message'   => '入力必須!'
> > >         )
> > >    );}
>
> > > ?>
>
> > > and view template....
>
> > > <?php echo $form->create( 'Inventory', array( 'action' =>
> > > 'index' ) ); ?>
> > > <?php echo $form->input(
> > >                 "make",
> > >                 array(
> > >                         "div" => false,
> > >                         "label" => ":Maker",
> > >                 ) ); ?>
> > > <?php echo $form->end( 'Send' ); ?>
>
> > > Here's my controller....
>
> > > <?php
> > > class InventoriesController extends AppController
> > > {
> > >     var $name = 'Inventories';
> > >     var $uses = array( 'Inventory' );
>
> > >     function index()
> > >     {
> > >         if( $this->data )
> > >         {
> > >             $this->Inventory->set( $this->data );
> > >             if( $this->Inventory->validates() ) { /* some logic */ }
> > >                 else { /* some other logic */ }
> > >         }
> > >     }}
>
> > > ?>
>
> > > The problem is that the data gets set on the model, but the validates
> > > function always return true, even though I am submitting a blank form.
>
> > > What could be going wrong?
>
> > > Thanks and Regards
> > > ShiVik

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 cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to