[Zope] Validate fields?

Christopher Petrilli petrilli@digicool.com
Thu, 26 Aug 1999 10:51:10 -0400


> "Itamar S.-T." wrote:
>> 
>> ScherBi@BAM.com wrote:
>> >
>> > This may be heresy to some folk, but you're probably better off doing this
>> > client side, if you are able.
>> > The Javascript in Version 4.x and above Netscape (and IE too, I think) has
a
>> > regular expression engine built in.
>> > An re to match all possible valid email addrs could be quite large however:
>> > http://enterprise.ic.gc.ca/~jfriedl/regex/email-opt.txt
>>
>> Or an External Method that verifies against the correct SMTP server that the
>> email exists .  An amazing amount of our gretting cards bounce due to bad
>> email addresses.
> Forget this...the most SMTP-Servers did not allow the VRFY-Command
> anymore, because of security reasons.

Or those of us running more "enlightened" mail systems (like Postfix),
there's no way for the program answering the SMTP port to know this
information.

I'd say the following would be an acceptable validation:

    * Verify that it has an '@' in it (! and % are VERY rare any more)
    * Verify that the TLD is valid (this requires a listing of all ISO
      country codes, plus org,net,com,int)

This at least makes sure that it's somewhat "well formed" and captures 99%
of the cases correctly.

Chris

--
| Christopher Petrilli        Python Powered        Digital Creations, Inc.
| petrilli@digicool.com                             http://www.digicool.com