IsValid('email', 'email@example.com,') inconsistency with ACF

Description

Having an email with a , at the end is I believe not valid as most client handle it as a seperator

ACF validates them to false, but Lucee returns true.

<cfscript> writeDump( isValid( 'email', 'example@example.com,' ) ); </cfscript>

Activity

Show:

Simon Goldschmidt 18 October 2021 at 20:40
Edited

In this case, it’s ok that CFMAIL sends to myname@yahoo.co but I need isvalid() to pick up the typo (myname@yahoo.co, rather than myname@yahoo.com) in a field that contains a single email address.

Pothys - MitrahSoft 18 October 2021 at 13:35

, I think so. , Now the mail id(myname@yahoo.co,) was valid when you use in cfmail tag attribbutes (to, bcc, cc) because this attributes allow list of mail id's so this is not a invalid mail id in this condition and it was fixed by this ticket https://luceeserver.atlassian.net/browse/LDEV-3687, Now you can pass this mail id into (to, bcc, cc) without error. But from attribute this mail id(myname@yahoo.co,) throws an error. Still isvalid() has an issue.

Zac Spitzer 18 October 2021 at 09:18
Edited

that example is related to this issue? https://luceeserver.atlassian.net/browse/LDEV-3687

Simon Goldschmidt 17 October 2021 at 21:58

We ran into this too…. a customer entered an email address with a typo that passed the isvalid() test but gave an error when trying to send an email to that address.

<cfoutput>#isvalid("email","myname@yahoo.co,")#</cfoutput> <cfmail to="myname@yahoo.co," from="support@yahoo.com" subject="test"></cfmail>

Pothys - MitrahSoft 19 December 2018 at 15:29

I've added a test case for this ticket & confirmed the issue happened on lucee. ACF returns as expected.

Pull request: https://github.com/lucee/Lucee/pull/620

Details

Assignee

Reporter

New Issue warning screen

Before you create a new Issue, please post to the mailing list first https://dev.lucee.org

Once the issue has been verified, one of the Lucee team will ask you to file an issue

Affects versions

Priority

Created 18 December 2018 at 20:53
Updated 17 November 2021 at 08:06

Flag notifications