0

I am interested in UX perspective for the following case. I have a web form with javascript validation and backend validation in Java.

Theoretically, if JS passes, backend validation should also pass, but in practice, sometimes, it is not the case (malicious users, hacks or just programmatic error).

What is the best way to inform the user that validation in backend have not passed?

Does it make sense at all to explain it for the user or enough just to alert him aka "Oops, smth went wrong.."?

Any other ideas?

Thank you!

JimMSDN
  • 484
  • 4
  • 16
walv
  • 2,680
  • 3
  • 31
  • 36
  • Why would you do different UX for these cases? The user doesn't care if it failed locally or on the server. – Mat May 21 '14 at 16:13
  • Also: http://ux.stackexchange.com/ - please search there. I think your question would be better asked over there. – Mat May 21 '14 at 16:14
  • Actually, thats the question: should I handle backend validation in the same manner as frontend (in UX perspective, with nice highlights and so on) and, as result, to spend good bunch of time? I am interested to hear different opinions. Thank you. – walv May 21 '14 at 16:21

1 Answers1

1

Let's consider the options:

  • Show the validation error - makes sense for those cases where you know, that the server performs more rigorous checks than the front end. Each of those more rigorous checks should have a corresponding validation error message.
  • "Oops, something went wrong" - makes sense, if you as a programmer don't know why it fails on the back end (can happen e.g. when RegExes are treated different in the server language). Also makes sense, if the user tampered with the JS code or the request payload.
  • Log out the user - can make sense, if you strongly suspect, that the user tried some tampering. But probably unnecessary.

But unless your target audience is extremely technical (and probably even then), you'll want to avoid a message like "Your input passed front end validation, but failed back end validation".

Chris Lercher
  • 37,264
  • 20
  • 99
  • 131