title: form submitting in ajax and symfony validations
body: <p>i got problem that when i submit form in jquery/ajax i get the data and check isvalid or not and save it. but wen the form is not valid it does not do symfony validations it automatically redirect to the page with out saving anything...the prob is it check the validation but it does not display validation error instead it simply redirected.</p>
  
  <pre><code>//my action code
  public function executeAjaxtest(sfWebRequest $request)
  {
    if ($request-&gt;isXmlHttpRequest())
    {
      if($request-&gt;isMethod('post'))
      {
        $this-&gt;form = new UserForm();
        $this-&gt;form-&gt;bind(
          $request-&gt;getParameter($this-&gt;form-&gt;getName()),
          $request-&gt;getFiles($this-&gt;form-&gt;getName())
        );
        if ($this-&gt;form-&gt;isValid())
        {
          $this-&gt;form-&gt;save();
          $this-&gt;redirect('registration/ajaxtest');
        }
      }
    }
  }
  </code></pre>