Copy link to clipboard
Copied
I have the following regex validating E-Mail addresses for me:
<CFIF refind("^[_A-Za-z0-9-]+(\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\.[A-Za-z0-9-]+)*\.(([A-Za-z]{2,3})|(aero|coop|info|museum|name))$", attributes.email_address) EQ 0>
<CFSET request.error = listappend(request.error, "#attributes.return_error#", ",")>
</CFIF>
Problem is it's denying E-Mail addresses with a period (.) just before the at symbol (@), such as:
regex isn't my strong suit, can anyone help me with this one?
Thank you in advance.
Copy link to clipboard
Copied
ColdFusion has an isValid() function available that you can use instead of regex.