title: Override / remove server-side validation in Symfony2.5
body: <p>Say I have the following form builder buildForm method:</p>
  
  <pre><code>/**
   * @param FormBuilderInterface $builder
   * @param array $options
   */
  public function buildForm(FormBuilderInterface $builder, array $options)
  {
  
  $builder
      -&gt;add(
          'travelTime',
          'datetime',
          array(
              'label' =&gt; 'Time',
              'date_widget' =&gt; 'single_text',
              'time_widget' =&gt; 'single_text',
              'invalid_message' =&gt; 'Please enter a valid date and time',
          )
      )
      -&gt;add(
          'acmeEntity',
          'entity',
          array(
              'label' =&gt; 'Acme Entity:',
              'class' =&gt; 'AcmeBundle:MyEntity',
              'expanded' =&gt; false,
              'multiple' =&gt; false,
          )
      )
  }
  </code></pre>
  
  <p>How can I override (or remove) validation for the 'acmeEntity' form field (and only that field) so that if I call:</p>
  
  <pre><code>$form-&gt;handleRequest($request);
  $form-&gt;isValid();
  </code></pre>
  
  <p>in a Controller, then acmeEntity will not be included in the validation that determines whether <code>$form-&gt;isValid()</code> returns true? I've tried adding <code>constraints =&gt; false</code>, to the field options, but I'm receiving this error message:</p>
  
  <pre><code>Notice: Trying to get property of non-object in /var/www/vendor/symfony/symfony/src/Symfony/Component/Form/Extension/Validator/Constraints/FormValidator.php line 67
  </code></pre>
  
  <p>Does anyone know the proper way to disable server-side validation for a Symfony form field?</p>
  
  <p>EDIT:</p>
  
  <p>Note that I am not looking for how to disable validation completely. This can be done by adding:</p>
  
  <pre><code>    // Disable form validation
      $builder-&gt;addEventListener(FormEvents::POST_SUBMIT, function ($event) {
          $event-&gt;stopPropagation();
      }, 900); // Always set a higher priority than ValidationListener
  </code></pre>
  
  <p>to the bottom of a form builder. </p>
  
  <p>Rather, I want to know how to completely disable validation for a <em>single</em> form field. Thanks everyone and good hunting!</p>