title: EJS page not rendering /redirecting after req.getValidationResult() method
body: <p>Ajax request has the following code:</p>
  
  <pre><code>function validate_referral(e){
      // stop default action
    e.preventDefault();
  
      const  button = this.children[this.children.length-1];
      //Form Handling with ajax
  
      $.ajax({
          url      : '/validatereferral',
          method   : 'GET',
          data     :  $(this).serialize(),
          dataType :  'json',
  
       beforeSend : function(http){
              button.style.opacity = '0.7';
              button.innerText = 'Submitting';
              button.setAttribute("disabled", "true");
          },
      });
  }
  </code></pre>
  
  <p>Now i am validating in the DB if the code exists and if so i would like to render/redirect to a different web page. But render/redirection is failing. Any help is much appreciated.</p>
  
  <pre><code>router.get('/validatereferral',function(req,res){
      var referralCode = req.body.referralcode;
      if(referralCode == ""){
          data = {msg:"Referral Code is required.",param:"",success:false};
      }else {
          var validation = req.checkBody('referralcode', 'Referral code already exist. Please enter a unique code').isExist_referralcodegen();
              req.getValidationResult()
              .then(function(result) {
                  var error = result.array();
                  var data;
                  if (!(error.length == 0)) {
                      data = {msg: "This is an invalid referral code.", success: false};
                      res.send(data);
                  }
                  console.log("validgen");
                  //res.redirect("http://localhost:3000/signup")
                  res.render('signup',{title:"Community Network | Sign Up",header:false,navbar:false});
              })
      }
  });
  </code></pre>