title: Magento Register Form validate with VarienForm function get response
body: <p>Currently I am creating a register form and validating it using Magento VarienForm method. I just want to know how I can get response whether the user has passed the validation or not? If it fails then I will stop the ajax. Here is my code:</p>
  
  <pre><code>var dataForm = new VarienForm('register-form', true);
  jQuery('#register-form').submit(function(e){
      jQuery.post( "&lt;?php echo $baseUrl; ?&gt;quickcheckout/index/register", jQuery( "#register_form_mobile" ).serialize()).done(function( data ) {
      var successRegister = isNumber(data);
          if(successRegister)
          {
              location.reload();
          }
          else
          {
              console.log(data);
          }
      });
  })
  </code></pre>