I'm trying to find a way to add validation for email addresses in an open ended question. I tried this forum question's answer but it gives me an error even when entering valid email addresses: https://legacy.sawtoothsoftware.com/forum/11534/email-validation
I also tried script language from the other 2 sites linked in that answer (links to those below as well) but to no avail. Other cited links: https://www.regular-expressions.info/email.html
http://emailregex.com/
The code I'm using in the "Advanced" -> "Custom JavaScript Verification" tab: var regex = /^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/;
var resp = SSI_GetValue('OpenEndQ');
if (!regex.test(resp)) {
strErrorMessage = 'Error: please type a valid email address';
}
Email validation Lighthouse studio v9.13.0
Resolved
1 reply