Hi All

I am working on the validation in cake12, powerfull !
I am using the l10n for multi language, and I set some custom message
into the $validate :

 array('rule' => ....,
         'message' => 'erroruser');

Actually I can't use the __('erroruser') in the model definition for
var $validate (unless I missed something somewhere), bug going deeper
I found out that modifying the line (in model.php, method invalidate,
lime 1739 of SVN branch) as follow :

<<<             $this->validationErrors[$field] = $value;
>>>            $this->validationErrors[$field] = __($value, true);

This make my message appearing according to the desired language (or
the initial message if not defined in default.po)

Is there a built-in way to do this, such as a parameter I forgot
somewhere ? Would be convenient to have an "afterValidate" method to
override, I could "translate" my messages there.

Thanks
Franck


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