[Zope] Validate fields?

Juergen Specht js@anima.de
Thu, 26 Aug 1999 15:34:57 +0200


Andreas Kostyrka wrote:
> > how can i validate input fields in Zope?
> > If somebody fills something in a input field and i expect
> > an email-adress, how can i check the right syntax?
> Well, try this:
> <dtml-if "'@' in field">
>   GOOD Email address?
> </dtml-if>
Mhm, but this is only a basic check that there is
an @ in it. Everybody can use the following strings:
@@
bla@bla
@bla@
@

not so good...

> > I know how to do it in perl with regular expressions but in
> Well, somebody posted a patch or so to add the regular expression module
> functionality to the DTML namespace ;)
Good idea, volunteers anywhere?
:)

Juergen