Case: enterprise web-client solution for sales orders, the User needs to select lots of items to perform one operation in bulk and not all the items are applicable for this operation (due to hidden parameters, status, etc.). Please advise, which practice is better to follow: A) allow user to select anything/all and let the backend validate the selection and if any not suitable item is found - rollback the operation dropping the message listing the items caused the rollback. B) validate the selection on UI on click of the button allowing to send to backend only the 100% valid set of items, so backend will not fail.
So far we can choose only from these options because of the performance issues.
A - This is the preferred option. That said, the content has to be crystal clear, both before and after the selections are made as this ensures that the user is informed and doesn't leave the process thinking that they were successful in getting everything they selected.
The user first needs to be informed that there is no guarantee that every selection they choose will be available before they make their selection. Once the system has determined their fate, there should be distinctive UIs for the happy path (100% of the selections are available) as well as the not-so-happy-path (<100% of their selections are available). The error handling should look very different than the happy-path so that the user is clearly informed that one or more of their selections were not available. It should be very easy to tell which selection(s) were available and which selection(s) weren't.