title: Jquery Steps and FormValidation (re-validate)
body: <p>I am using Jquery Steps and FormValidation but when onStepChanged i cannot re-validate fields.</p>
  
  <pre><code>    onStepChanging: function(e, currentIndex, newIndex) {        
          var fv = $('#form1').data('formValidation'), // FormValidation instance
          // The current step container
          $container = $('#form1').find('section[data-step="' + currentIndex +'"]');
  
          // Validate the container
          fv.validateContainer($container);
  
          var isValidStep = fv.isValidContainer($container);
          if (isValidStep === false || isValidStep === null) {
          // Do not jump to the next step
          return false;
      }
  
      if (currentIndex === 3) {  // form
          $.ajax({
              type: "POST",
              url: URL,
              data: $('#form1').serialize(),
              dataType: 'json',
              cache: false,
              async: false,
              success: function(data){
  
                      if (data.result === 'error') {
  
                          for (var field in data.fields) {
                              $('#'+field).val('');
                              $('#form1').formValidation('revalidateField', field)
                          }
  
                          $('#form1').steps("previous");
                          return;
  
                      } else {
                          console.log('Success');
                      }
  
                  },
  
              error: function(x, status, error) {
                  return false;
              },
          });         
      }
      return true;
  }
  </code></pre>
  
  <p>The inputs are empty but not re-validated!</p>
  
  <p>I also tried with (updateStatus and validateField) but no success!! Whats going wrong!</p>
  
  <h2>UPDATED</h2>
  
  <p>JSFIDDLE: <a href="https://jsfiddle.net/RednBlack/LfzpgL87/18/" rel="nofollow">Demo</a></p>
  
  <p>On step 3 (Confirmation) Iam making post to server side to process data (product stock, shipping etc..) if the validation process didn't pass go back to step 1 or 2 and re-enter data. or if validation process is ok then show result on step 3 and allow user to finish(submit form).</p>
  
  <p>Php code:</p>
  
  <pre><code>$result = "error";
  $fields = array(
   'product' =&gt; 'Out of stock',
   'id' =&gt; 'ID not found',
  );
  $response = array('html'=&gt;$html, 'result'=&gt;$result, 'fields'=&gt;$fields);
  echo json_encode($response);
  </code></pre>