Yes, we have a java script that validates the domain of the email address that is submitted in a form. Below is the script we are running with an abridged invalid domain list. Hope this helps.
<style type="text/css">
span.mktFormMsg {
display:block !important;
left:5px !important;
position: relative !important;
}
</style>
<script type="text/javascript" src="/js/public/jquery-latest.min.js"
language="JavaScript"></script>
<script type="text/javascript">
// set no conflict mode for jquery
var $jQ = jQuery.noConflict();
//edit this list with the domains you want to block
var invalidDomains = ["@123mail.org","@aol.com"];
function formSubmit(elt) {
// run the custom validation. If it succeeds, run the Marketo validation
if (!isEmailGood()) {
Mkto.setError($jQ("#Email ~ span").prev()[0],"Please enter a business address, not one from a public service");
return false;
} else {
Mkto.clearError($jQ("#Email ~ span").prev()[0]);
}
return Mkto.formSubmit(elt);
}
function isEmailGood() {
for(i=0; i < invalidDomains.length; i++) {
if ( $jQ("#Email[value*=" + invalidDomains[i] + "]").length > 0) {
return false;
}
}
return true;
}
</script>