On Mon, Oct 5, 2009 at 9:02 PM, #2Will <[email protected]> wrote:
>
> OK, cool thanks. The comment is saving properly now.
>
> so i have this:
>
> echo $form->textarea('ForumComment.comment', array('rows'=>5));
>                if ($form->isFieldError('ForumCommentComment')){
>                        echo $form->error('ForumCommentComment');
>                }
>
> if the comment is blank, how do i raise the error for that field? It
> dosn't do it automagicaly.

I can't remember for sure, but I believe you have to set it manually
in the controller if validate() fails.

$this->validationErrors['ForumComment.comment'] = '...';

If someone else knows a more proper way I'd like to know also.

--~--~---------~--~----~------------~-------~--~----~
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