Data Validation process

S

Steve Wright

Hi all,

I am after some advice.

I have a form with 40 odd fields in it.

Firstly,

I was wondering what the best way of doing data validation is. As I see it
I can do it in a number of ways.

1. Validate each field, by firing a validation script onBlur, as it gets
entered.
2. Validate the entire form at the end of the data entyry process.
3. Use a mixture of both by validating each field as I go and then
validating the entire form again on submit.

I am currently leaning towards option 3.

Secondly,

2. Is it appropriate to use the window status bar to provide guidance on
data entry or is there a better way of doing it.

Note: the validation must be done Client side as I have no access to Server
side stuff. The form is submitted using a mailto:.

TIA
Steve
 
B

brucie

in post: <
Steve Wright said:
I was wondering what the best way of doing data validation is.
http://www.xs4all.nl/~sbpoley/webmatters/formval.html

3. Use a mixture of both by validating each field as I go and then
validating the entire form again on submit.

you _always_ need to validate SS on form submission
2. Is it appropriate to use the window status bar to provide guidance on
data entry

absolutely not. the stat bar is for the visitors use, not the site
authors. besides some browsers prevent the author from fiddling with the
stat bar. if its important put it on the page.
Note: the validation must be done Client side as I have no access to Server
side stuff.

you _need_ SS stuff
The form is submitted using a mailto:.

mailto: is _not_ a valid form action and is very broken. you _need_
server side scripting to handle forms.

form scripts:
http://www.hotscripts.com/PHP/Scripts_and_Programs/Form_Processors/
http://www.hotscripts.com/Perl/Scripts_and_Programs/Form_Processors/
http://www.hotscripts.com/ASP/Scripts_and_Components/Form_Processors/
remotely hosted:
http://www.hotscripts.com/Remotely_Hosted/Form_Processors/
 
M

Mitja

Steve Wright said:
Hi all,

I am after some advice.

I have a form with 40 odd fields in it.

Firstly,

I was wondering what the best way of doing data validation is. As I
see it I can do it in a number of ways.

1. Validate each field, by firing a validation script onBlur, as it
gets entered.
2. Validate the entire form at the end of the data entyry process.
3. Use a mixture of both by validating each field as I go and then
validating the entire form again on submit.

I am currently leaning towards option 3.

I'd go for 2. When the user has really finished entering data, he'll let you
know by pressing the button.
Note: the validation must be done Client side as I have no access to
Server side stuff. The form is submitted using a mailto:.


AUGHHH. Many users don't have JavaScript (enabled). It's far from reliable.
It's ugly. Some people in this NG will skin you alive for saying this. Then,
you'll be cooked over a slow fire. With carrots and onions and stuff. In a
way, they're right. This is just not the way to do it. There are free
providers which equip you with perl, you know. Lots of ads and so on, but
who said they have to host the entire page? Just use them for script
hosting.
Secondly,

2. Is it appropriate to use the window status bar to provide
guidance on data entry or is there a better way of doing it.

I'd go for static text beside the fields. Most people don't even notice the
status bar when concentrating on an input field. Besides, it fails if user
has no JS. Maybe you could do something like:
<span class="guide">Enter an odd number here:</span><input ...>

Then, with JS, make the span disappear, set "display:block" to it and with
some additional code turn it into a tooltip of sorts. If you really want a
dynamic site, of course. As I said, I prefer static text - like on my page:
http://www.oktaeder.com/?page=search.en&lang=1
 

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

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top