Hacker News new | ask | show | jobs
by ghnws 725 days ago
I'm qurious what that code was doing that could be just moved to the backend. Usually forms have some validation for a better experience with the final validation on the server. Did you get rid of that and just show an error if the submission failed?
1 comments

Near enough yes but it was a nice helpful error message with the form fully populated as they left it - as far as it looks the user it’s client side validation as the service responds with just the correct html for the form and htmx swaps out the chunk of html.

Its like old school for validation back in the CodeIgniter days.

So the 500 lines removed was literally just removing functionality in the first place (you should always validate on both sides anyway).