[thelist] PHP Form Validation

.jeff jeff at members.evolt.org
Mon Jan 6 16:41:01 CST 2003


shawn,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: shawn allen
>
> Well I'm of the (obviously snarky) opinion that if users
> can't properly copy and paste (or even remember) a
> well-formed email address, they get what they deserve.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

well sure, and equally demanding marketing types that demand that email is
required on every form on the site also get what they deserve.  however,
once a buttload of data is collected and the syntax of the emails wasn't
checked, we run into issues when said marketing types want to use said
collected email addresses for some form of campaign.  i'm the one stuck with
dealing with all the bounces caused by bs email addresses from a whole slew
of stupid people that could have been easily addressed with syntax
validation.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> I don't see how the commonality of my method has
> anything to do with it.  It sounds as though this is a
> business website. Hence, they have the potential to lose
> business because of an overly-restrictive regular
> expression. [...]
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

conversely, they have the potential for collecting lots of garbage data that
*could* have been fixed by the user if they were to choose a method like
yours.  where the commonality comes in is which "problem" contains the
largest set of users.  are the users that use plussed usernames more common?
or, are users that input invalid email addresses more common?  if it's the
latter, why cater for the former?  or, vice versa?

if it's a joe consumer site, i can totally see the latter being in the
majority and the former being probably non-existent.  if it's your local
geek board with the appropriate *nix pr0n adorning the site, i can see how
it'd be the other way around entirely.  i don't have the *privilege* of
having to work with the latter.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> As I mentioned in another message, I equate
> this to rendering sites inaccessible to certain UA's.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

naw, your comparison is all wrong.  you can very easily do something about
the email address you are providing.  on the other hand, most people aren't
able to do anything about the ua string their browser sends (or even know
that's what's causing the site to be inaccessible).

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> No, it's not a *requirement*, it's a preference, and
> more importantly, a privilege.  A website that denies me
> the right to either my preferences or my privileges
> loses my business.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

which is it?  a right?  or, a privilege?  make up your mind man.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> > i avoid all that nonsense by using a vanity domain
> > where the catchall account points at my chosen pop
> > account.  so, thelist at jeffhowden.com,
> > evolt.org at jeffhowden.com, and foo at jeffhowden.com all
> > end up in my inbox (or wherever my rules tell them to
> > go at the time), yet i can still track where they came
> > from.
>
> You're right, that's probably a better idea :\
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

easier to filter too, should i need to at some point.  more difficult for
the person bearing the "personalized" email address to find out my actual
pop account address as well.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> [...] Seriously though, if you're running a business,
> would you risk losing any number of customers just
> because you didn't feel like changing your regular
> expression? Do you *really* need those %'s in there? :P
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

naw, you're right.  you've convinced me.  i'm going to add in a regex
replace routine that removes any thing after a +, but before the @.  *then*
i'll run the regex against it to see if it's valid syntax and if so, do
what's necessary with the fixed email address.  now i can keep lusers from
putting in larttarget at aol as an email address and allow you and that one
other d00d that use plussed addresses to do your thing as well.

;p

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list