Here is the snippet if someone wants it:

$num_errores_totales = count($form->getErrorSchema()->getErrors());

$num_errores_globales = count($form->getErrorSchema()-
>getGlobalErrors());

if (0 == $num_errores_totales - $num_errores_globales){
        echo $form->renderGlobalErrors();
}

Javi


On Mar 31, 2:57 pm, Javier Garcia <[email protected]> wrote:
> For example: i have the signin action of sfDoctrineGuardPlugin. I have
> empty the 'username' input widget and then click on 'Sign in', this
> two messages are showed "-Required" and "The username and/or password
> is invalid". I would like to show just the first message ("-
> Required").
>
> Javi
>
> On Mar 31, 11:48 am, Javier Garcia <[email protected]> wrote:
>
> > Hi,
>
> > in a form if there is a field and a global error both messages are showed.
>
> > I would like to show the global errors only if there isn't any field error.
>
> > Any idea?
>
> > Javi

-- 
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

To unsubscribe, reply using "remove me" as the subject.

Reply via email to