Couldn't you do something similar to Squishdot's "validArticle" dtml
method? In addition to verification that the fields are filled in, you
could pass the email variable off to a python regular expression that
checks for [EMAIL PROTECTED] syntax.
-ed-
At 07:21 PM 7/21/00 -0400, you wrote:
On
On Tue, 18 Jul 2000, Duncan Booth wrote:
Use javascript to check that all required fields are present before
the form is actually submitted. Here is some of the code I use:
Note, however, that using Javascript to do the checking client side
is only useful as a user convenience. If you have
The nicest way would be to use a JavaScript clientside script on the form
page.
I think you can find a good one @ javascript.internet.com
If you don't want to use Javascript, you can use the regular expression
found from the javascript and use it in a python method of module.
- Original
Is there a way to require at least an "@" sign in the email field? The
powers that be think this would be useful.
dtml-unless "'@' in REQUEST.email"... complain here .../dtml-
unless
Here's the form processing code as it stands today. Any help is
appreciated.
Use javascript to check that
Hello,
I am new to Zope; since our webmaster left I'm trying to make small
changes to the website. We have a standard registration form that
collects information from users (first name, last name, email, company
name, etc.) All of the fields are required, except address 2, address3.
Great.
Stacy Formby writes:
Is there a way to require at least an "@" sign in the email field? The
powers that be think this would be useful.
You can do it on the client with javascript or on the server
with
dtml-if "'@' in mailfield"
!-- okay code --
dtml-else