On Mon, Nov 29, 2010 at 5:43 AM, Hans Wiriya Tsai <[email protected]> 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 [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