Chapter #46. If the Form Fails Validation, Show the User Which Field Needs Their Attention
If you really have to validate on the server side and can't do it on the client side (see #45 Validate Data Entry as Soon as Possible)), then never send a user back to a form without telling them what to do next, and never with a generic message such as "there was an error."
The user will have likely entered several different bits of data and they'll need to get the context of the form back into their head again, once it comes back from server-side validation. The worst way to do this is by forcing them to scan the whole form again, looking for what they might have got wrong.
Highlight the problem (or problems) with the form and show the user where they need to correct items.
Sending the user back to an identical form to the one they just submitted, then expecting them to work out what went wrong—like some kind of puzzle—is the world's worst video...