I read the question, but I broke the rule of providing a clear comprehensive answer for email address. The replace was just a quick way to to correct the double hyphen on the server side. Just food for thought. string.replace("--", "-") on the JQuery/Javascript side, I would just use regex, I haven't tested the regex for double hyphen, but I should today.
var re_EmailAddress = new RegExp("\\w+([-+.']\\w+)*@\\w+([-.]\w+)*\\.\\w+([-.]\\w+)*")
var txt_EmailAddress_Validate = $('[id*="_txt_CreateNewAccount_Email_Field"]').val().trim();
var match_EmailAddress = re_EmailAddress.exec(txt_EmailAddress_Validate);
if (match_EmailAddress == null) {
// Invalid email address
}
else {
// valid email address
}
I suppose there is a way to step through the email address in Javascript one char at a time, and get the position of the first hyphen, and check for a hyphen after the first occurrence. But I'm not going to experiement with that right now.