I tried this:

    $this->setValidator('email', new sfValidatorAnd(array(
       new sfValidatorEmail(array('required' => true, 'trim' => true)),
new sfValidatorString(array('required' => true, 'max_length' => 80), array('required' => 'THIS FIELD IS REQUIRED')),
       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."'))
     )));

but it still shows "Required."


On 08/24/2010 05:00 PM, Thor wrote:
you have to pass it as an "required" field in an array, given as
second parameter of the validator


new sfvalidatorsomething(array(...),array('invalid'=>'invalid
message','required'=>'required message'));

On 24 Ago, 13:05, Javier Garcia<tirengar...@gmail.com>  wrote:
   Sorry, could you paste the entire validator? I dont understand..

On 08/24/2010 08:47 AM, Michał Piotrowski wrote:





Eh, sorry,
1 array parameters
array('required' =>    true)
2 array messages
array('required' =>    'Pole wymagane.')
'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
--
Javi

Ubuntu 8.04


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

Reply via email to