Form Field Validation

P

Paul

I have created a form in FP that collects an e-mail
address & allows a user to upload a file. i am trying to
validate these fields to:
a. return an error if an invalid email address is entered
b. check the email address in "email" field & check this
against an email address in a "confirm email" field, &
return an error if they don't match.
c. Validate the file upload field so that only a .jpeg
file up to 1mb can be uploaded.
Can this be done in FP, or does it require a custon Java
script? Any advice is appreciated
 
K

Kevin Spencer

Hi Paul,

Yes, you will need to write custom JavaScript to do all of this. Of course,
you can use FrontPage to write it, but it won't write it for you.

There is really no way to check for a "valid" email address. You can make
sure that there is an "@" symbol in it, and that it is followed by a string
followed by a dot, followed by another string, but that doesn't mean that it
points to a real address. There's no way to verify that. If you really want
to do this, there are some publicly available JavaScripts out there to do
this. Just search Google for "validate email JavaScript"

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.
 
T

Thomas A. Rowe

No this can not be done using the FP Validation. Custom JavaScript can be
used to compare the two email address, but a server-side script would need
to be used to test for file size restrictions.

--

==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle,
MS KB Quick Links, etc.
==============================================
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top