You can't use it in validation rules (I suppose for the message) ...
I have actually done it for the validation, but for this made my own
invalidate method in app_model.php as follow :
function invalidate($field, $value = null)
{
if (!is_array($this->validationErrors))
{
$this->validationErrors = array();
}
if(empty($value))
{
$value = true;
}
$this->validationErrors[$field] = __($value, true);
}
The changes to the core function is the last line. Then you can set
the "msgid" in the validation rules.
I submitted a ticket to have this modification, but seems it has not
been introduced yet.
Hope this helps
On Dec 5, 12:31 am, cakeFreak <[EMAIL PROTECTED]> wrote:
> Well sorry, this works in controllers.
>
> I had problems using it in a validation rule inside models.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---