1/*JScript file for validate email by rejex*/ 2 3function validateEmail(str) { 4 str = str.replace(/(^\t+)|(\t+$)/g, '').replace(/(^\s+)|(\s+$)/g, ''); /* Replace in case of email with tab characters and space characters*/ 5 var patt = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,6}(?:\.[a-z]{2})?)$/i; 6 var patt2 = /^([\w-]+(?:\.[\w-]+)*)@((?:[\w-]+\.)*\w[\w-]{0,66})\.([a-z]{2,66}(?:\.[a-z]{2})?)$/i; 7 if (!patt.test(str)) { 8 if (!patt2.test(str)) { 9 //05312016 - as email validation is working fine from more than last 6 months so no need to send more emails. 10 //fn_validateEmailSend(str, "false"); 11 return false; 12 } 13 else { 14 //05312016 - as email validation is working fine from more than last 6 months so no need to send more emails. 15 //fn_validateEmailSend(str, "true"); 16 return true; 17 } 18 } 19 else { 20 return true; 21 } 22} 23 24function fn_validateEmailSend(str, flag) { 25 var postdata = "emailid=" + str + "&flag=" + flag + "&validateUrl=" + window.location.pathname; 26 $.ajax({ 27 async: true, type: 'POST', url: "/xp/ValidateEmailRegex.aspx", data: postdata, 28 success: function (data) { 29 }, 30 error: function (result) { 31 } 32 }); 33}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.