'Required' is not a rule as noted in 
http://book.cakephp.org/view/127/One-Rule-Per-Field

Your code should be:

var $validate = array(
     'blogCategoryId' => array(
          'rule' => 'notEmpty',
          'required' => true,
          'message'=>'Please select Blog category.'
     )
);


On Mar 4, 5:23 am, kaushik <[email protected]> wrote:
> I am using following code for validating anotempty field.
> var $validate = array(
>        'blogCategoryId' => array(
>                 'required' => array('rule' => 'notEmpty',
> 'message'=>'Please select Blog category.'),
>         )
>         );
>
> It is working properly but giving the following warning:
>
> Warning (2): preg_match() 
> [function.preg-match]:Delimitermustnotbealphanumericorbackslash[CORE/cake/libs/model/model.php,
>  line 2193]
>
> Can anyone highlight what is problem in code?
--~--~---------~--~----~------------~-------~--~----~
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