Input & Output
Data Validation (2.4.i)
There are five key validation checks:
- Presence check - is the data present (has the required field been filled)?
- Length check - is the data of a reasonable length? For example a name wouldn't be 100 characters long.
- Format check - is the data in the correct format? For example, a date might be in the format dd/mm/yy
- Range check - is the data in the correct range? For example, the age for somebody voting should be between 18 and 120.
- Existence check - does the data that has been entered match a previously recorded value. For example, does this shop sell a product with an UPC of 123456789999?