Hi,
I had the same problem and finally I tried with this in controller:
/**
 * @assert:NotBlank (message="El email es necesario")
 * @assert:Email (message="El formato del email no es válido")
 * @assert:MinLength(5) (message="El email es muy corto")
 * @assert:MaxLength(200) (message="Usa un máximo de 200 caracteres")
*/
protected $email;


And with this for the view:
{{ form_errors(form.email) }}


{{ form_errors(form) }} -> does not work

This works for me: symfony2 PR10

Regards,
Xavi

On 12 abr, 12:02, kassel <alvaro.tou...@gmail.com> wrote:
> Hi
> I'm try to make that type of 
> formhttp://symfony.com/doc/2.0/book/forms/overview.html
> using ContactRequest with annotation.
> But the form before send is not really validation,. even email
> validation
>
> i put that code inside config.yml
>  validation:    { enabled: true, annotations: true }
>
> What i'm doing wrong

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