sologroup's method still gave me the same error. Might depend on the
version. For those using 1.2.0.7119 RC1, use Yasir's answer:
'names' => array(
'rule'=>VALID_NOT_EMPTY ,
'message'=>'Please provide your name.' )
)
--~--~-~--~~~---~--~~
You received this
'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 M
Which version are you using?
On Wed, Mar 4, 2009 at 5:23 AM, kaushik wrote:
>
> I am using following code for validating a not empty field.
> var $validate = array(
> 'blogCategoryId' => array(
> 'required' => array('rule' => 'notEmpty',
> 'message'=>'Please select Blog cate
'names' => array('rule'=>VALID_NOT_EMPTY ,'message'=>'Please provide your
name.'),
You can use it for your validation.
On Wed, Mar 4, 2009 at 4:23 PM, kaushik wrote:
>
> I am using following code for validating a not empty field.
> var $validate = array(
> 'blogCategoryId' => array(
>
I am using following code for validating a not empty field.
var $validate = array(
'blogCategoryId' => array(
'required' => array('rule' => 'notEmpty',
'message'=>'Please select Blog category.'),
)
);
It is working properly but giving the following warning: