Disallow edu and org email addresses

Hi, we have a few landing pages where we sometimes receive edu and org email addresses, I’d like to flag an error as we already do for Gmail and other free email services. Is there a javascript code I can add in addition to the one we already use?

LP example: https://sanfrancisco.bettsrecruiting.com/employer-form-a/

existing javascript:

  window.ub.form.validationRules.email.nonWebmailEmail = true;

  window.ub.form.customValidators.nonWebmailEmail = {
    isValid: function(value) {
      return /\@(?!(me|mac|icloud|gmail|googlemail|hotmail|live|msn|outlook|yahoo|ymail|aol|edu|)\.)/.test(value.toLowerCase());

    message: 'Please enter your work email address or see note below',

Hmmm, you definitely have the right regex in the script for gmail and other services @helmstetler

But if you want to block “.edu” and “.org” those characters come after the “@domain.” So the regex would have to change and it could get really complicated.

It would be easier to use a form title or the pre-fill text to specifically state the type of email required.