Re: Data Validation not working

2010-03-18 Thread Henrique Machado
Linux is case sensitive, windows isn't

At Linux, You can have at the same directory the files: inventory.php and
Inventory.php

Henrique Machado
TI Expert


2010/3/19 SeeVik 

> Hello all
>
> Thanks for guiding me out of this problem.
>
> @ Dr. Loboto - Yes that was the problem. The model filename was
> Inventory.php. As soon as I changed it to inventory.php, it worked
> like a charm. Although why it worked on Windows local server and not
> on Linux web server is what I don't get. Anyway, as long as the
> problem is solved I won't complain.
>
> Thanks a lot.
> ShiVik
>
> On Mar 18, 12:08 am, logout  wrote:
> > I also vote for problems in the path/filename.
> >
> > Be sure exactly what file you edit (the model) - I had exactly the
> > same problem - it turned out that i was editing a wrong file.
> > When I opened the correct one, all worked fine.
> >
> > Your file for the model is inventory.php in the app/models, right?
>
> 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.comFor
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>
> To unsubscribe from this group, send email to cake-php+
> unsubscribegooglegroups.com or reply to this email with the words "REMOVE
> ME" as the subject.
>

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Data Validation not working

2010-03-18 Thread SeeVik
Hello all

Thanks for guiding me out of this problem.

@ Dr. Loboto - Yes that was the problem. The model filename was
Inventory.php. As soon as I changed it to inventory.php, it worked
like a charm. Although why it worked on Windows local server and not
on Linux web server is what I don't get. Anyway, as long as the
problem is solved I won't complain.

Thanks a lot.
ShiVik

On Mar 18, 12:08 am, logout  wrote:
> I also vote for problems in the path/filename.
>
> Be sure exactly what file you edit (the model) - I had exactly the
> same problem - it turned out that i was editing a wrong file.
> When I opened the correct one, all worked fine.
>
> Your file for the model is inventory.php in the app/models, right?

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

To unsubscribe from this group, send email to 
cake-php+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.


Re: Data Validation not working

2010-03-17 Thread logout
I also vote for problems in the path/filename.

Be sure exactly what file you edit (the model) - I had exactly the
same problem - it turned out that i was editing a wrong file.
When I opened the correct one, all worked fine.

Your file for the model is inventory.php in the app/models, right?

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


Re: Data Validation not working

2010-03-17 Thread WebbedIT
@sooraj: If using the form helper it automatically includes validation
errors unless your suppress it by setting error=>false

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


Re: Data Validation not working

2010-03-16 Thread sooraj francis
actually you havent set the display option to show error in your view file

isFieldError('Inventory.make'))
e($form->error('Inventory.make', null, array('class' => 'message')));


hope this solves your problem

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


Re: Data Validation not working

2010-03-15 Thread Dr. Loboto
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  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  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  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
> > >  > > class Inventory extends AppModel
> > > {
> > > var $name = 'Inventory';
> > > var $validate = array(
> > > 'make' => array(
> > > 'rule'  => 'notEmpty',
> > > 'message'   => '入力必須!'
> > > )
> > >);}
>
> > > ?>
>
> > > and view template
>
> > > create( 'Inventory', array( 'action' =>
> > > 'index' ) ); ?>
> > > input(
> > > "make",
> > > array(
> > > "div" => false,
> > > "label" => ":Maker",
> > > ) ); ?>
> > > end( 'Send' ); ?>
>
> > > Here's my controller
>
> > >  > > 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


Re: Data Validation not working

2010-03-15 Thread SeeVik
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  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  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
> >  > class Inventory extends AppModel
> > {
> > var $name = 'Inventory';
> > var $validate = array(
> > 'make' => array(
> > 'rule'  => 'notEmpty',
> > 'message'   => '入力必須!'
> > )
> >);}
>
> > ?>
>
> > and view template
>
> > create( 'Inventory', array( 'action' =>
> > 'index' ) ); ?>
> > input(
> > "make",
> > array(
> > "div" => false,
> > "label" => ":Maker",
> > ) ); ?>
> > end( 'Send' ); ?>
>
> > Here's my controller
>
> >  > 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


Re: Data Validation not working

2010-03-15 Thread Lucca Mordente
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  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
>  class Inventory extends AppModel
> {
> var $name = 'Inventory';
> var $validate = array(
> 'make' => array(
> 'rule'  => 'notEmpty',
> 'message'   => '入力必須!'
> )
>);}
>
> ?>
>
> and view template
>
> create( 'Inventory', array( 'action' =>
> 'index' ) ); ?>
> input(
> "make",
> array(
> "div" => false,
> "label" => ":Maker",
> ) ); ?>
> end( 'Send' ); ?>
>
> Here's my controller
>
>  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