Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the frontend validations will, most of the time, be a subset of the backend ones, with many shared validation points.


Yes, exactly!

I’ve several times been in the position of writing a new UI for an existing API. You find yourself wanting to validate stuff before the user hits “submit”, because hiding errors until after submitting is terrible UX; and to do that, you find yourself digging into the server code to figure out the validation logic, and duplicating it.

And then years or months later the code gets out of sync, and the client is enforcing all sorts of constraints that aren’t needed on the server any more! Not good.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: