Tuesday, November 30, 2010

Re: Error : VALID_NOT_EMPTY

Hi,

Aren't you following http://book.cakephp.org/view/1528/Blog for creating sample blog application?

Amit Badkas

PHP Applications for E-Biz: http://www.sanisoft.com



On Tue, Nov 30, 2010 at 9:03 AM, Hans Wiriya Tsai <hansw.id@gmail.com> wrote:
great, thx for the prompt help! I would of course read the entire docs
(later), but your quick help is very helpful for a beginner like me.

On Tue, Nov 30, 2010 at 9:23 AM, cricket <zijn.digital@gmail.com> wrote:
> On Mon, Nov 29, 2010 at 5:43 AM, Hans Wiriya Tsai <hansw.id@gmail.com> wrote:
>> I hv CakePHP 1.3.6 installed on Ubuntu and learning to create simple
>> blog. When I add validation to my model, I got this error:
>>
>> Notice (8): Use of undefined constant VALID_NOT_EMPTY - assumed
>> 'VALID_NOT_EMPTY' [CORE/cake/libs/class_registry.php, line 141]
>>
>>
>> Here's my model:
>> <?php
>> class Blog extends AppModel {
>>        var $name = 'Blog';
>>        var $validate = array(
>>                        'title' => array(
>>                                        'rule' => VALID_NOT_EMPTY,
>>                                        'message' => 'Title of a blog cannot be empty'
>>                        )
>>        );
>> }
>> ?>
>>
>> Any idea what this error is all about? Thx for any help.
>
> Yes, it's an undefined constant. VALID_NOT_EMPTY was deprecated awhile
> back. Use 'rule' => 'notEmpty' instead.
>
> http://book.cakephp.org/view/1143/Data-Validation
>
> 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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
>

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

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+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en

No comments: