I added a couple of tweaks -- (1) to allow for up to 8-character domain suffixes (there are some long ones out there -- "museum", "travel", etc.); (2) allows the user to leave the field empty with the initial if statement; (3) if the field has content, the focus stays on the field if there's a validation error. Thanks to OP Andrew Smith for the script.
if (this.rawValue != null) {
// Create a new Regular Expression Object
var r = new RegExp("^[a-z0-9_\\-\\.]+\\@[a-z0-9_\\-\\.]+\\.[a-z]{2,8}$"); // (allows 2-8 characters in domain suffix)
// Set the regular expression to look for an email address in general form
// Test the rawValue of the current object to see if it fits the general form of an email address
var result = r.test(this.rawValue);
if (result == false) {
xfa.host.messageBox("Invalid e-mail address -- please use format username@domain.xxx","CHECK E-MAIL FORMAT",0,0);
xfa.host.setFocus(this);
}