I'm learning about Software Architecture and especially about scaffolding large-scale architecture and patterns for modern web applications.
I've noticed that I don't have a pattern for data validation or rules, sometimes I add validations
or checks ()
in client-side layer and others in the server-side or by adding requirement in databases schemas but I see several redundant validations.
Let's say I have an input with a username
and this username
should have max 10 characters
, as far as I understand one validation in front-end layer ( client-side ) is enough without adding requirements/validations in a database for this property of our schema ( user
in MongoDB).
My question how do I organize or create a standard validation flow for a web application?
I appreciate you if you can recommend a practical book, a blog, or a series of videos from an expert.
You should do validation on the client side to improve the user experience by not letting them do things the server won’t allow. On the other side, client validation that rejects valid client requests will annoy users and cost you money. And you need to realise that while the user is busy entering data, that data will be invalid until they are finished.
– gnasher729 May 03 '20 at 09:02