The web works very easy right?
Input -> Process -> Output
If your Input has already an invalid state, processing and outputing data will be unpredictable.
This is why input validation as strict as possible matters.
14. ● Data type validators (int, string..)
● Minimum and maximum value range check for numerical
parameters and dates
● Minimum and maximum length check for strings
● Array of allowed values for small sets of string
parameters
● Regular expressions for any other structured data
covering
● Validation against JSON Schema and XML Schema
What and how to validate?