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
-~----------~----~----~----~------~----~------~--~---

Reply via email to