Data Validation

Definition
Make sure the incoming data has the correct type or format
Data validation

How does it work?

Incoming data that has the wrong data type (i.e a float where an integer is expected) or the wrong format (i.e. "2023/01/18" where "2023-01-18" is expected) can cause errors in the system. They should be detected and denied at the first opportunity when it comes in to the system.

Examples

  • Data type: float instead of string
  • Range: a string that is too long, a negative integer
  • String encoding: ISO-8859-1 in stead of UTF-8
  • Non-existing enumeration value

When should you use it?

  • Whenever incoming data is not under your control

Links