Thanks for the advice.  Unfortunately this will not work for me
because it chokes on:

$this->Mark->invalidate('mark_number'.$i, "Mark already exists);

I have two types of marks for input (NewMarks and ExistingMarks), and
they are stored in the data matrix under $this->data['NewMarks'] not
under $this->data['Marks'].
So with the above statement, cake tries to look for the variable
data['Marks'] and invalidate it and I get the error message

Undefined property:  ObservationsController::$Mark [CORE\app
\controllers\observations_controller.php, line 134]

Is there any way to invalidate a field directly in the controller if
the field is not attached to any model field?
For example, is there anyway to access the form helper directly in the
controller a.la.
$this->form->error('NewMarks'.'mark_number'.$i, "Mark already
exists" );

The above won't work, but you get the idea.  By the way, I am using
the formHelper and validation from 1.2


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to cake-php@googlegroups.com
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