Case Sensitive Email Address in Coldfusion using CFInput
So, it seems that email addresses are technically case sensitive. I know it sounds ridiculous but after a fair bit of research it seems to be the case.
The domain name part of an email address is case insensitive (i.e. case does not matter). The local mailbox part, however, is case sensitive. The email address ReCipiENt@eXaMPle.cOm is indeed different from firstname.lastname@example.org (but it the same as ReCipiENt@example.com).
But Case Typically Does Not Matter
Since the case sensitivity of email addresses can create a lot of confusion, interoperability problems and widespread headaches, it would be foolish to require email addresses to be typed with the correct case. Hardly any email service or ISP does enforce case sensitive email addresses, returning messages whose recipient's email address was not typed correctly (in all upper case, for example).
I came across this when using the Coldfusion CFinput tag to validate an email address text filed.
This was causing me a lot of headaches. The client didn't want the email addresses to be case sensitive. I was thinking of scraping the CFInput tags and going with a more orthodox jquery server side validation. This would have probably taken an hour to rewirte but I then remembered that with th CFInput tag you can validate using RegEx
Thanks Coldfusion, Simples :)comments powered by Disqus