I just ran into this issue and did some digging:

Here's francky06l's ticket:
https://trac.cakephp.org/ticket/3318

It appears it was fixed in changeset 5815 but then the change was
reverted in changeset 5827:
https://trac.cakephp.org/changeset/5827

Does anyone know why this change was reverted and what the recommended
solution is now?

On Dec 5 2007, 4:12 am, francky06l <[EMAIL PROTECTED]> wrote:
> 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to