Le 20/06/2011 14:34, ???? ????? a écrit :
Sorry, I am new at symfony2, and I mean disable some validation rules on create/update.

This is my *Entity*, I set for field *password* validation rule *NotBlank*, and this is true only for create, but on update I want disable this rule, how I can do this?, Or maybe I should do this in *Form* class by set *required* option, and remove *NotBlank* rule in *Entity*?

The easy way is to do it using the /required/ option of the form (and it was the one I suggested previously). If you want to do it with the validation rules, the solution is to use a specific validation group for this constraint, and to use it only when creating.

--
Christophe | Stof

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