For context: This is a desktop application interacting with a service running on W7.
I'll try and leave all the technical details out of this, but here goes:
Part of my application has to send a large amount of data to the server which is then validated server side. Any errors found are sent back to the client to handle.
My 'problem' is that this large amount of data (in this case, a person) can have a lot of things 'wrong with it' which can be summarised into two main errors:
- Required fields not being filled in. (Name not provided)
- Data being entered but still invalid due to a business rule (person is under the age of 18, phone number entered as ABC123, assessment was completed, but no completion date was entered, etc.)
Now even with all the client side validation I can put in, there still might be cases when a number of errors that aren't detected. (business rules, mostly) How should these errors be displayed to the client? I only see three real options here:
Displaying the server side errors into the UI somehow. I'd like to avoid this possible since I'm not 100% sure on how to code this without writing a mass of spaghetti code to determine which error is for which field.
List one error at a time. When a user submits the data, show the first error that is returned and ignore all the others. When the user resubmits, shows the next one, and so on. I have a feeling this could annoy some people who will probably send me angry emails along the lines of 'Why don't you show me all the errors at once?!?!?'
Show them all at once. I could have all the errors showing at once, but this is going to cause a few problems:
- The dialog box should potentially be huge if they've somehow got 15 or so errors.
- No one is going to remember all 15 problems unless they screenshot the message or write them down.
- The API on Windows might not allow me to fit all message in one dialog leaving users to click through an unknown amount of dialogs.
How should I approach this?