Validation of values - all values at once or one at a time

Hi

I want to generate a report based on certain criteria. The values entered by the user in the text boxes of the HTML form needs to be validated from the database table. Should I validate all the fields at once or should I validate one field at a time. How does it effect the performance.

I am using html, servlets, stateless session beans and DAOs.

Thank you

Siva

[404 byte] By [skuruganti] at [2007-9-26 2:02:37]
# 1
if your validation needs some certain workflow, I think validate one by one is good choice to void some mistakes/invalide datas made by client. if you don't need any workflow validate them at one time.
sujianqiang at 2007-6-29 8:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2
If I understand right, this is user experience issue and therefore the best person to ask is the potential user of the application during the requirements gathering phase.
neville_sequeira at 2007-6-29 8:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 3

I support sujianqiang's suggestion. I'd just like to add some comments:

It would be good if you could tell the user about all the errors in one go.

The user would be frustrated to see one error after another when all the errors could have been detected in the first place.

Note that if some input is dependent on the validity of a previous input, then you're better off putting it on the next page. Obviously, this next page only shows up after all of the input of the first page has been validated.

KewlJava at 2007-6-29 8:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 4
Personally i feel validation at one shot is good, since here it impacts on performance. But if user wants this to be in step by step, then go ahead with him. So its a good idea to ask your user of the application.
sudhisv at 2007-6-29 8:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 5
Thanks guys. That was helpful-Siva
skuruganti at 2007-6-29 8:44:19 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...