Validation goes into the model.

On Jul 12, 8:50 pm, Victor <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I started the Blog example to learn about the CakePhp framework. It
> sounds like a very usefull framework.
> Everything was working ok before adding thevalidationpart. After
> deleting tehvalidationpart, it is still working (except thevalidationoff 
> course).
>
> After adding thevalidationpart I receive errors.
> I added the following into the posts_controller.php:
> var $validate = array(
>
>         'title'  => VALID_NOT_EMPTY,
>         'body'   => VALID_NOT_EMPTY
>
> );
>
> After adding thevalidationpart I receive the following errors
> opening any posts page (view, index, add):
> "
> Notice: Use of undefined constant VALID_NOT_EMPTY - assumed
> 'VALID_NOT_EMPTY' in C:\wamp\www\cake\cake\dispatcher.php on line 157
>
> Notice: Use of undefined constant VALID_NOT_EMPTY - assumed
> 'VALID_NOT_EMPTY' in C:\wamp\www\cake\cake\dispatcher.php on line 157
>
> Warning: session_start() [function.session-start]: Cannot send session
> cache limiter - headers already sent (output started at C:\wamp\www
> \cake\cake\dispatcher.php:157) in C:\wamp\www\cake\cake\libs
> \session.php on line 154
>
> Warning: Cannot modify header information - headers already sent by
> (output started at C:\wamp\www\cake\cake\dispatcher.php:157) in C:\wamp
> \www\cake\cake\libs\session.php on line 155
> "
>
> When I add the quotes besides the VALID_NOT_EMPTY as specified in the
> message, I do not get any error. But after that, thevalidationis not
> working. When the title and body are left empty in the add-page, it is
> still added in the database without giving any error.
>
> Does someone know how what I am doing wrong here?
>
> Regards,
> Victor


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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