[symfony-users] Re: Any way to show the global errors only if there isn't any field error?

2010-03-31 Thread Javier Garcia
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,

[symfony-users] Re: Any way to show the global errors only if there isn't any field error?

2010-03-31 Thread Javier Garcia
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