4.10 - Validation Checks
Validation is a process to check that data is reasonable or sensible before it is accepted as an input. There are several different checks that can be used:
Checks data is within a certain range, e.g. age is between 0 and 115
Checks data is a certain type, e.g. age is integer, not real.
Checks data is entered in a certain way, e.g. date might be DD/MM//YYYY
Checks that data has actually been entered and not left blank, e.g. for a password.
A table of acceptable entries, e.g. countries of the world might be selectable from a table.
Checks the length of the input is within a certain amount, e.g. first name 3 to 15 characters.
Verification is the process of checking that data is correct after it has been entered.
Typing in the data twice to make sure there were no spelling errors the first time, e.g. entering a password twice.
Checking two copies of data to ensure they are precisely the same, e.g. a confirmation page before buying a product.
For each input below suggest which validation checks may be used.
a. First name
b. Age in years
c. Email address
d. Last visit to the dentist
a. Explain the difference between double entry and proofreading.
b. Suggest when these two verification methods may be used.