Wrong!
have you tried that?
I have tried it before posting this, trust me, and due to the Model
constructor specifications it fails!
that's why i've done this hooking!

Even more, if you go to the documentation page of the validation
issue, it says there that you can't do the localization in the Model,
it says that you must do it on the form helper!

regards,
mike

On 28 ago, 18:54, Rafael Bandeira aka rafaelbandeira3
<[EMAIL PROTECTED]> wrote:
> > > So i think it would be great for all the cake comunity to have this
> > > concept implementated on the next release of cake!
>
> > Please open an enhancement ticket for it on trac (https://
> > trac.cakephp.org) so the devs can consider to add it.
>
> I don't think it's appliable... use MyModel::__construct()
>
> class User extends AppModel
> {
>     var $name           = 'User';
>         var $validate   = NULL;
>
>         function __construct($id = false, $table = null, $ds = null)
>         {
>                 parent::__construct($id, $table, $ds);
>                 $this->validate = array(
>                                 'nombre' => array(
>                                                 'regla1_nombre' =>
> array(
>
> 'rule'  => array('minLength','3'),
>
> 'message'       => __('Minimum length of 3 characters',true)
>                                                                               
>       ),
>                                                 'regla2_nombre' =>
> array(
>
> 'rule'  => array('maxLength','50'),
>
> 'message'       => __('Maximum length of 50 characters',true)
>                                                                               
>      )
>                                                         )
>                                                  );
>         }
>
> }
>
> Why would one have to care about one more method with the same purpose
> of the another?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to