Hey Just an update on this. One of my fellow coder has said that I'm
doing a mistake by using plurals
My App controller name is plural to Model
If the controller name is
ApplicationToolsController and Model name is ApplicationTool and
database table is application_tool and view directory name
application_tools.. I tried making everything singular with exception
of database table. but no luck.. Can somebody tell me where am I doing
wrong?
On Jul 4, 11:23 am, Sai Krishna <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm a newbie to cakePHP 1.2. I had been working module in which I had
> been doing the following model validation. The validation never fails,
> what am I doing wrong
>
> Model contains this
> -----------------------------------------------------------------------------------------------------------------
> var $name='MyModule';
> var $validate = array(
> 'module'=>array(
> 'rule'=>'numeric',
> 'message'=>'Not a valid module
> selected'
> ),
> 'description'=>array(
> 'rule'=>array('custom','/[A-Z0-9_-\\\/
> [EMAIL PROTECTED]&\*\(\)]+/si')
> 'message'=>'Not a valid character in
> the description'
> )
>
> );
> ----------------------------------------------------------------------------------------------------------------
> And in Controller I do this, $this->data comes from a an ajax form
> ----------------------------------------------------------------------------------------------------------------
> $this->Model->set($this->data);
> echo $this->Model->validates();
> ----------------------------------------------------------------------------------------------------------------
> this validation ever returns 1. what am I doing wrong?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---