[Zope] smpthost or dtml tag problems
Jonathan Hobbs
toolkit at magma.ca
Fri Sep 24 17:31:48 EDT 2004
> Hamzat Kamal wrote:
> >
> > <dtml-if "email and '@' in email">
>
> try:
>
> <dtml-if "email and ('@' in email)">
>
> > <dtml-if "email == ''">
> > E-mail address</p>
> > </dtml-if>
>
> Yuk, this doesn't match your test above...
I can't remember the original question, but if it was something like: "I
want to check that the user has entered an email address (via a form) and
that the email address contains the '@' character" then this should work:
<dtml-if "REQUEST.has_key('email') and ('@' in REQUEST.get('email', ''))">
Email OK
<dtml-else>
Email Not Good
</dtml-if>
Jonathan
More information about the Zope
mailing list