If you want localization of your validation error messages then it is
best to define them in the views rather than the model - model just
gives the type of error to the view and view sorts out what it needs
to show for that error - that is the proposed 'CakePHP' way to do it.

HTH

Tarique



On Jan 5, 2008 5:12 AM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I have setup some 1.2 beta validation rules with the message key, but
> this throws and error.  Any idea?
>
> Here is the piece from my model...
>
>    public $validate = array(
>         'username' => array(
>             'alphanumeric' => array(
>                 'rule' => 'alphaNumeric',
>                 'message' => __('error_username', true)
>              ),
>             'between' => array(
>                 'rule' => array('between', 8, 20),
>                 'message' => __('error_username_between', true)
>             ),
>         ),
>
>
> And here is the error...
>
> Parse error: syntax error, unexpected '(', expecting ')' in /home/
> username/public_html/cake12/app/models/users.php on line 12
>
> >
>



-- 
=============================================================
Cheesecake-Photoblog: http://cheesecake-photoblog.org
PHP for E-Biz: http://sanisoft.com
=============================================================

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