[Zope] Validate fields?
Juergen Specht
js@anima.de
Thu, 26 Aug 1999 16:15:51 +0200
Thanx Bill,
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
...but my experience says, that you *never* can trust the client
side. It is much better to have this on the server-side:
Input <-------------------
| |
| |
V |
Validation not ok --> Error Message
ok
|
|
V
Work with input.
Feature Request: Maybe a good idea to have some configurable
Functions inside Zope, like:
CheckForValidEmailSyntax
CheckForNumbersOnly
CheckForCharsOnly
CheckForCharsandNumbersOnly
Normally you don't need much more.
Any volunteers? ;)
Juergen