title: symfony2 using validation groups in form
body: <p>I have a Entity with a property:</p>
  
  <pre><code>/**
   * @var string $name
   *
   * @Assert\NotBlank(groups={"foobar"})
   * @ORM\Column(name="name", type="string", length=225, nullable=false)
   */
  private $name;
  </code></pre>
  
  <p>The Form:</p>
  
  <pre><code>class MyType extends AbstractType
  {
      public function buildForm(FormBuilder $builder, array $options)
      {
          $builder-&gt;add('name');
      }
  
      public function getDefaultOptions(array $options)
      {
          return array(
              'data_class' =&gt; '...',
              'validation_group' =&gt; array('foobar'),
          );
      }
  
      public function getName()
      {
          ...
      }
  }
  </code></pre>
  
  <p>In the Controller I bind the Request and call $form->isValid()</p>
  
  <p>But how to define the validation_group?</p>