79646154

Date: 2025-05-30 22:31:12
Score: 1
Natty:
Report link

I would recommend splitting apart the concept of UI friendly error checking, from server side validation of bad data.

On the UI, use JavaScript before you submit the form. There will be no delay doing this, and you can verify things are the way you expect them to be.

Server side, you still have to content with malicious users attacking your forms, so do your checks there...but if there is a failure on the server side - don't get fancy. Simply refresh the existing page.

By splitting it in two, you have the UI friendly stuff operating promptly, and you have your "catch-all" activities handled server side, without needing to inject all sorts of UI logic on the back end.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Not Really Relevant