>  isValid("email","name@gmail") is returning a "Yes"
>
> Am I missing something or is this a bug. As far as I know CF9 would have 
> returned NO

Well, it's not really a bug. Within certain contexts, that would in
fact be a valid email address. It obviously wouldn't be a valid email
address on a public network, but on an internal network you can have
all sorts of wacky things.

And validation of public addresses is a difficult thing, due to
constant changes and the flexibility of characters allowed in email
addresses for both the local and domain parts.

I recommend that you not "validate" email addresses at all! As an
end-user, I get very frustrated when I encounter forms that tell me
that my (perfectly valid) email address is not valid (not
dwa...@figleaf.com, but I have many email addresses). Taking a quick
look, all of the validation functions provided in this thread would
fail with those email addresses. I don't think any of them allow plus
signs, for example, which are (a) valid characters and (b) used more
often than you might think.

Instead, consider simple, user-friendly alternatives. Perhaps you
could just look for an @ character with preceding and following
characters, then validate it by attempting to send an email to it. Use
that email to allow the user to proceed, if it's something important,
or tell the user that they should have received an email and if they
don't get it, there may be a problem with their email address. Ask the
user to enter it twice, if you like.

Dave Watts, CTO, Fig Leaf Software
1-202-527-9569
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Service-Disabled Veteran-Owned Small Business
(SDVOSB) on GSA Schedule, and provides the highest caliber vendor-
authorized instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:359975
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to