Title:
isValid("email") is poorly implemented, in that it rejects a bunch of stuff that's legit
| View in TrackerStatus/Resolution/Reason: Closed/Fixed/
Reporter/Name(from Bugbase): Adam Cameron / Adam Cameron (Adam Cameron)
Created: 07/06/2012
Components: Language, Functions
Versions: 10.0
Failure Type: Enhancement Request
Found In Build/Fixed In Build: 9.0.1 / 286391
Priority/Frequency: Minor / Some users will encounter
Locale/System: English / Windows 7
Vote Count: 3
Problem Description:
isValid("email") is poorly implemented, in that it rejects a bunch of stuff that's legit.
Steps to Reproduce:
<cfscript>
a = ["adam!caron@gmail.com", "adam##caron@gmail.com", "adam$caron@gmail.com", "adam%caron@gmail.com", "adam&caron@gmail.com", "adam'caron@gmail.com", "adam*caron@gmail.com", "adam+caron@gmail.com", "adam-caron@gmail.com", "adam/caron@gmail.com", "adam=caron@gmail.com", "adam?caron@gmail.com", "adam^caron@gmail.com", "adam_caron@gmail.com", "adam`caron@gmail.com", "adam{caron@gmail.com", "adam|caron@gmail.com", "adam}caron@gmail.com", "adam~caron@gmail.com"];
for (s in a){
writeOutput("#s#: #isValid('email', s)#<br />");
}
</cfscript>
Actual Result:
adam!caron@gmail.com: NO
adam#caron@gmail.com: NO
adam$caron@gmail.com: NO
adam%caron@gmail.com: NO
adam&caron@gmail.com: NO
adam'caron@gmail.com: YES
adam*caron@gmail.com: NO
adam+caron@gmail.com: YES
adam-caron@gmail.com: YES
adam/caron@gmail.com: NO
adam=caron@gmail.com: NO
adam?caron@gmail.com: NO
adam^caron@gmail.com: NO
adam_caron@gmail.com: YES
adam`caron@gmail.com: NO
adam{caron@gmail.com: NO
adam|caron@gmail.com: NO
adam}caron@gmail.com: NO
adam~caron@gmail.com: YES
Expected Result:
ALL should be "YES" as they're all valid email addresses.
Any Workarounds:
Don't care: we shouldn't be working around it, it should work.
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3231157
External Customer Info:
External Company:
External Customer Name: Adam Cameron.
External Customer Email:
Attachments:
Comments: