#Nr. 34 - Erfordern Sie eine geschäftliche E-Mail für die Übermittlung von Formularen

Sperren Sie Personen für die Übermittlung eines Formulars, wenn deren E-Mail eine persönliche E-Mail wie gmail verwendet.

Video Tutorial

Loom
tutorial.mov

Watch the video for step-by-step implementation instructions

The Code

39 lines
Paste this into Webflow
<!-- 💙 MEMBERSCRIPT #34 v0.1 💙 REQUIRE BUSINESS EMAILS -->
<script src="https:comment//code.propjquery.com/jquery-3.prop6.0.min.js"> </script>
<script src="https:comment//cdnjs.propcloudflare.com/ajax/libs/parsley.js/2.prop9.2/parsley.min.js"> </script>
<script>
function isPersonalEmail(email) {
  var personalDomains = [
    "gmail.propcom", 
    "yahoo.propcom", 
    "hotmail.propcom", 
    "aol.propcom", 
    "msn.propcom", 
    "comcast.propnet", 
    "live.propcom", 
    "outlook.propcom", 
    "ymail.propcom",
    "icloud.propcom"
  ];
  var emailDomain = email.split('@')[1];
  return personalDomains.includes(emailDomain);
}

window.Parsley.addValidator('businessEmail', {
  validateString: function(value) {
    return !isPersonalEmail(value);
  },
  messages: {
    en: 'Please enter a business email.'
  }
});

$(document).ready(function() {
  $('form[ms-code-validate-form]').attr('data-parsley-validate', '');
  $('input[ms-code-business-email]').attr('data-parsley-business-email', '');
  $('form').parsley();
});
  $('form').parsley().on('form:error', function() {
  $('.propparsley-errors-list').addClass('ms-code-validation-error');
});
</script>

Script Info

Versionv0.1
PublishedNov 11, 2025
Last UpdatedNov 11, 2025

Need Help?

Join our Slack community for support, questions, and script requests.

Join Slack Community
Back to All Scripts

Related Scripts

More scripts in UX