1 Reply Latest reply on Nov 25, 2013 7:17 AM by 8442

    Email validation code?

      Hi All,

      I've found the following javascript online to use for email validation to block out personal email addresses. However, I've put it on a Marketo landing page with a form and am still able to submit the form using my gmail address. Any ideas on how to tweak the javascript or a different javascript to use? Thanks in advance!

           <script type="text/javascript">
           function isGoodEmail(email) {
               if(isValidEmail(email)) {
                   if(/(aol|gmail|yahoo|hotmail)\.com$/.test(email)) {
                      alert(' valid email, but not for this site.  No free service emails!');
                      return false;
                   }
                   return true;
               }
               return false;
           }
           </script>