Hi Emilio!
> I'll ilustrate the problem with an example, I want to make something
> like this:
>
> <code>
> var $validate = array
> (
> "status" => array
> (
> "rule" => "numeric",
> "rule" => array ("range", -1, 101),
> "message" => "error_task_status",
> ),
> );
> </code>
>
> If you see the message for the error on validation, you see
> "error_task_status", the idea is that the model calls
> __("error_task_status") for the message instead of printing
> "error_task_status" directly.
>
I don't know if I understood properly, but I usually do this way:
var $validate = array
(
"status" => array
(
"rule" => "numeric",
"rule" => array ("range", -1, 101),
"message" => __("error_task_status",true),
),
);
This way, you can perform translation automatically!
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---