OK - I finally have an answer on how ACC determines a valid email. It took way more effort than I expected but we got an answer:
So I am assuming that the first part of this response is the dataPolicy check and the second is a regex against the XtkEmail_Characters option. e.g. something like this
loadLibrary("xtk:shared/nl.js");
loadLibrary("xtk:shared/dataPolicy.js");
var email = "blah232456@gmail.com";
/**
*
* Function to determine if an email is valid for the Adobe Campaign
* database checks. This process checks using the default email dataPolicy
* and the option value XtkEmail_Characters.
*
* @param email {string} email address to test
* @return true(valid) | false(invalid)
*
**/
function isValidAdobeEmail( email ) {
var patt = "[^@" + getOption('XtkEmail_Characters').replace(/[.*+?\-^${}()|[\]\\]/g, '\\\$&') + "]";
//logInfo("EmailFunctions.js::isValidAdobeEmail() - Escaped XtkEmail_Characters: " + patt);
var regex = new RegExp(patt, "g");
var testFlag = !regex.test(email);
//logInfo("Result of XtkEmail_Characters test: " + ((testFlag)?"valid":"invalid"));
var dataPolicyResult = !NL.isEmpty(NL.DataPolicy.filter("email", email));
//logInfo("Result of dataPolicy email test: " + ((!NL.isEmpty(dataPolicyResult))?"valid":"invalid"));
return testFlag && dataPolicyResult;
}
//Test the email
if( isValidAdobeEmail(email) ) {
//email address is valid
} else {
//email is invalid
}