Doing something with jQuery after form successfully submitted

Doing something with jQuery after form successfully submitted

I have a form modal on a Bootstrap 4 page and want to display a success message in the modal after the form is successfully submitted, but my function is firing before validation is completed. Is it possible to plug in my post-validation jQuery in here somewhere?
  1. (function() {
  2.   'use strict';
  3.   window.addEventListener('load', function() {
  4. var forms = document.getElementsByClassName('needs-validation');
  5. var validation = Array.prototype.filter.call(forms, function(form) {
  6.   form.addEventListener('submit', function(event) {
  7. if (form.checkValidity() === false) {
  8.   event.preventDefault();
  9.   event.stopPropagation();
  10. }
  11. form.classList.add('was-validated');
  12.                       }, false);
  13. });
  14.   }, false);
  15. })();