title: Symfony Form Model @Unique on new Email field
body: <p>Good evening,</p>
  
  <p>i have added a form for changing the email of a user:</p>
  
  <p>ChangeEmailFormType:</p>
  
  <pre><code>$builder-&gt;add('current_email', 'email', array(
          'label' =&gt; 'profile.changePassOrEmail.emailLbl',
          'translation_domain' =&gt; 'Startup',
          'mapped' =&gt; false,
          'attr'   =&gt; array(
              'readonly' =&gt; true,
              'value' =&gt; $this-&gt;user-&gt;getEmail()
          )
      ))
      -&gt;add('new_email', 'repeated', array(
          'type' =&gt; 'email',
          'options' =&gt; array('translation_domain' =&gt; 'Startup'),
          'first_options' =&gt; array('label' =&gt; 'profile.changePassOrEmail.newEmail'),
          'second_options' =&gt; array('label' =&gt; 'profile.changePassOrEmail.newEmail2'),
          'invalid_message' =&gt; 'profile.changeEmail.mismatch',
      ))
  </code></pre>
  
  <p>For the 'new_email' i generated a Form Model Class as the following:</p>
  
  <pre><code>class ChangeEmail
  {
  /**
   * @var string
   * @Assert\NotBlank()
   * @Assert\Email()
   */
  public $new_email;
  }
  </code></pre>
  
  <p>My Controller is the following to create the Form and process it:</p>
  
  <pre><code>  */
  public function changeEmailAction(Request $request)
  {
      $user = $this-&gt;container-&gt;get('security.context')-&gt;getToken()-&gt;getUser();
      if (!is_object($user) || !$user instanceof UserInterface) {
          throw new AccessDeniedException('This user does not have access to this section.');
      }
  
  
      $form_email = $this-&gt;createForm(new ChangeEmailFormType($user));
      $form_email-&gt;setData(new ChangeEmail());
  
      $form_email-&gt;handleRequest($request);
  
      if($form_email-&gt;isValid())
      {
      }else{
      }
  
      return $this-&gt;render(
          'UserBundle:ChangeEmail:changeEmail.html.twig',
          array(
              'form_email' =&gt; $form_email-&gt;createView()
          )
      );
  }
  </code></pre>
  
  <p>This all works fine, but i've got a problem with my "ChangeEmail" class.
  I don't know how to add there the "@Unique" Annotation to the $new_email field.
  How can i check there on the database or even create a custom annotation for checking if the
  email already exists on my usertable? In the registration form, FosUserBundle handles that.</p>
  
  <p>Regards and thanks.</p>