title: Magento ajax form validation
body: <p>I have a form in Magento that I build in code, and that works with ajax, which I need to validate.</p>
  
  <p>I would like to be able to use Magento's built-in validation functionality, but I don't know how I would trigger it since the form is not submitted. The data is retrieved via ajax and outputted in a list below the form.</p>
  
  <p>Is there someone who can point me in the right direction?</p>
  
  <p>Thanks in advance.</p>
  
  <p>Edit:</p>
  
  <p>This is the javascript code used to hande the ajax request. Its called by the onclick event of the button.</p>
  
  <pre><code>function advancedtranslateSearch(url){  
      new Ajax.Request(url, {
        method: 'get',
        parameters: $('search_form').serialize(),
        onSuccess: function(transport) {
            json = transport.responseText.evalJSON();
            $('result').update('&lt;div class="hor-scroll"&gt;'+json.records+'&lt;/div&gt;');
        }
      });
  }
  </code></pre>