Validation
Validation is an automatic check that data is reasonable and sensible before it is processed. It cannot prove the data is correct, only that it is acceptable. Common validation checks include:
- Range check — value falls between limits, e.g. a month from 1 to 12
- Length check — a set number of characters, e.g. an 8-digit ID
- Type check — data is of the right type, e.g. only digits
- Presence check — a required field is not left empty
- Format check — data follows a pattern, e.g. a date as DD/MM/YYYY
Verification
Verification checks that data has been entered accurately and matches the original source. Two common methods are double entry (typing data twice and comparing) and a visual check (reading it against the source).
Key idea
Validation asks "is this data reasonable?" Verification asks "was this data copied in accurately?" They are different and are often used together.
Testing
Testing runs a program with chosen test data to check it works. Designers use normal data (accepted), abnormal data (rejected), extreme data (at the edge of the range) and boundary data (values on the exact limit).
Remember
- Validation is automatic; verification confirms accurate entry.
- Valid data can still be wrong, e.g. an age of 25 typed as 52.
- Boundary data tests values right at the accept/reject limit.