How is the computer able to detect when I don't fill a form properly?
Understanding input validation
Have you ever tried to register on a platform and your registration wasn't accepted because your password didn't meet the requirements? I know it's annoying so I'm going to explain what we use to catch you red-handed and why we have to do it.
We call it input validation (or just validation). A majority of our work as software engineers is making sure our clients use our digital solutions the way we want them to use it (so as to minimize the numbers of ways you can break the software and cause us grief). Input validation ensures that the type of data we collect from you comes in completely and in the format we want you to give it to us.
Because machines are really fragile and a wrong input can cause a lot of damage we instruct the machine to only accept your data if they meet certain requirements, we also tell the machine not to accept your responses if you skip some parts that we consider important (eg trying to register on a platform and not inputting your name). We instruct the browser/app to carry out input validation, we also ensure input validation at our server side just in case you're able to outsmart the browser/app.
Input validation is very important when you acknowledge the fact that we have clients who are error prone, pranksters who like comprise the integrity of software solutions for fun and hackers who engage digital infrastructure (with malicious intent). Without input validation a lot of platforms that enjoy widespread usage would quickly collapse when someone does something they shouldn't be doing on the platform.
The process of writing input validation is easier than it sounds most of the time. A lot of times it requires adding the "Required" attribute to the input field and/or some other wellknown attribute (for the client side). The server-side might be a bit more tricky but a lot of frameworks have created some functions/attributes/methods that makes the work easier.