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
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.
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.