title: bootstrap-4 form remove validations after submit
body: <p>I can't remove validations after submit, it's showing validations after successful message also. </p>
  
  <p>I have tried to submit after successfull submission all input fields and removed but validations remain same it's showing validation icons for every input field.</p>
  
  <pre class="lang-js prettyprint-override"><code>$('#formid').on('submit', function(e) {
  
    // if the validator does not prevent form submit
    if (!e.isDefaultPrevented()) {
      var url = "process.php";
  
      // POST values in the background the the script URL
      $.ajax({
        type: "POST",
        url: url,
        data: $(this).serialize(),
        success: function(data) {
          var messageAlert = 'alert-' + data.type;
          var messageText = data.message;
          // let's compose Bootstrap alert box HTML
          var alertBox = '&lt;div class="alert ' + messageAlert + 'alert-dismissable"&gt;&lt;button type="button" class="close" data-dismiss="alert" aria-hidden="true"&gt;&amp;times;&lt;/button&gt;' + messageText + '&lt;/div&gt;';
          if (messageAlert &amp;&amp; messageText) {
  
            $('#formid').find('.messages').html(alertBox);
            $('#formid').resetForm();
            $('#formid')[0].reset();
  
          }
        }
      });
      return false;
    }
  });
  </code></pre>