As written in the title, I'm wondering what is generally considered a better User Experience in situations where performing an action on the client-side needs to be validated server-side before the action can be completed. Is it better to make the user wait for the server to respond (could be slow depending on connection, the process, etc.), or to update the UI as if the action was successful, and then revert the UI change if the server-validation reports the action as a 'failure'?
A user is trying to rearrange the order of items in a list within a CMS by drag and dropping the items. The server-side check is needed to validate if the item still exists and it's new location is valid if incase another user have made any changes to the same content (or deleted it).
Should I display a spinner and make the user wait for the validation, or show it as - 'the item is moved' and move it back if an error occurs along with displaying an error message or a notification to let the user know that the operation failed?