2010/8/24 Javier Garcia <tirengar...@gmail.com>:
>  Hi,
>
> im trying to replace the default 'Required' message in this validator:
>
>    $this->setValidator('email', new sfValidatorAnd(array(
>      new sfValidatorEmail(array('required' => true, 'trim' => true)),
>      new sfValidatorString(array('required' => true, 'max_length' => 80)),
>      new sfValidatorDoctrineUnique(array(
>        'model' => 'sfGuardUserProfile',
>        'column' => 'email'
>      ), array(
>        'invalid' => 'An account with that email address already exists. If
> you have forgotten your password, click "cancel", then "Reset My
> Password."'))
>    )));

   $this->setValidator('email', new sfValidatorAnd(array(
     new sfValidatorEmail(array('required' => true, 'trim' => true)),
     new sfValidatorString(array('required' => true, 'max_length' => 80)),
     new sfValidatorDoctrineUnique(array(
       'model' => 'sfGuardUserProfile',
       'column' => 'email'
     ), array(
'required' => true,
       'invalid' => 'An account with that email address already
exists. If you have forgotten your password, click "cancel", then
"Reset My Password."'),

 array('required' => 'Pole wymagane.')


)
   )));

Should do the trick

Regards,
M

>
> but i don't know where should i add something like this: 'required' => 'You
> must write your e-mail').
>
> Any idea?
>
> --
> Javi
>
> Ubuntu 8.04
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony users" group.
> To post to this group, send email to symfony-users@googlegroups.com
> To unsubscribe from this group, send email to
> symfony-users+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/symfony-users?hl=en
>

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to