tracker issue : CF-4196745

select a category, or use search below
(searches all categories and all time range)

IsValid not validating email properly

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Shirak Avakian / Shirak Avakian (Shirak Avakian)

Created: 10/19/2016

Components: Language

Versions: 11.0

Failure Type: Incorrect w/Workaround

Found In Build/Fixed In Build: CF11_Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 0

Problem Description:IsValid('email','shirakavakian@gmail') returning yes even the .com is missing

Steps to Reproduce: dump the result of IsValid('email','shirakavakian@gmail') 

Actual Result:YES

Expected Result:NO

Any Workarounds:

use regex

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	4196745

External Customer Info:
External Company:  
External Customer Name: Shirak Avakian
External Customer Email:  
External Test Config: Windows 8.1 and windows server 2016 x64

ColdFusion 11 server on IIS 8



Same behavior on ColdFusion 2016
Comment by External U.
1613 | October 19, 2016 01:49:10 PM GMT
Shirak, shirakavakian@gmail is a valid email as defined in the SMTP protocol. You can also have a look at the comments on bug #CF-3944862 for a little more insight.
Comment by Immanuel N.
1614 | October 19, 2016 11:20:29 PM GMT
Immanuel, Before you change the status to Withdrawn, go ahead and send email to me using shirakavakian@gmail (without the .com) using cfm. If this function is called isValid('email') and is it not validating basic email format, then we don't need it and why we should use it? The bottom line is whether you want to live in theory or practical world.
Comment by External U.
1615 | October 19, 2016 11:56:33 PM GMT
While it might be sticking to the specification, it won't work with CFMAIL and I believe is counter to what most developers are expecting the behavior to be. This really needs to be fixed. IsValid("email", 'email','shirakavakian@gmail') should return false. The current behavior is also breaks backwards compatibility. The correct way to fix this would be to offer an "email-strict" validation option which conforms to the specification exactly. Keep the normal "email" validation for things that will actually work with CFMAIL.
Comment by Dan S.
30572 | March 26, 2019 08:56:04 PM GMT