Hey @milesbonnier,
If you’re familiar with using Javascript you could add change listeners to your Easy Forms email inputs that double check which TLD is being used. In this example I’m only allowing .com .net and .co but you could add more if you’d like to support more.
If you don’t know how to add custom Javascript you could use this plugin to do so https://www.ads-software.com/plugins/custom-css-js/
(function() {
const emailInputs = document.querySelectorAll( 'input[type=email]' );
const submitButtons = document.querySelectorAll( '.yikes-easy-mc-submit-button' );
emailInputs.forEach( function( singleInput ) {
singleInput.addEventListener( 'change', handleChange );
} );
function handleChange( event ) {
event.preventDefault();
const reg = /^[a-zA-Z0-9_.+-]+@(?:(?:[a-zA-Z0-9-]+\.)?[a-zA-Z]+\.)?(.*[a-zA-Z])\.(com|net|co)$/;
if (reg.test(event.target.value)) {
submitButtons.forEach( button => button.disabled = false );
} else {
alert('Invalid Email address detected');
submitButtons.forEach( button => button.disabled = true );
}
}
})();
If you want to support more TLD’s just look at this section of code (com|net|co)
to support more TLD’s just add them like to (com|net|co|cc)
.
Cheers,
Freddie