Multiple choiceQuestion 1 · Recall
Loading…
By the end you can name all seven validation checks, say exactly what each one tests, and pick sensible checks for a given field.
A validation check is a rule about what values a field may hold. Each rule tests one property of the value — is it there, is it the right length, is it in the right pattern, is it in the allowed set, and so on.
The trick to choosing a check is to finish this sentence: "this field can only hold a value that is …". The end of the sentence tells you which check to use.
| Check | The question it asks | Example field | Value that fails |
|---|---|---|---|
| Presence | Is it there at all? | Surname | blank |
| Length | Is it the right number of characters? | Phone number | 8 digits when 11 expected |
| Range | Is it between two limits? | Exam mark | 105 |
| Limit | Is it on the allowed side of one limit? | Hours worked | −2, or 45 when the rule is "no more than 40" |
| Format | Does it match the required pattern? | Date | 31/13/2026 |
| Existence | Is it in the list of real values? | Customer ID | C9999 when no such customer exists |
| Check digit | Do the digits agree with the calculated check? | Barcode | one digit changed |
The seven validation checks
Range and limit look similar but are not the same.
So "the temperature must be between −10 and 40 °C" is a range check. "The overdraft must not exceed £500" is a limit check, because only the top is bounded.
Length and format are also easy to mix up.
A value can satisfy one and fail the other: 12345ABCDE6 is 11 characters (length passes) but is not all digits, so the format check fails.
Real fields usually need more than one rule, applied in a sensible order.
Take a date of birth on a registration form:
DD/MM/YYYY.The order matters for the user experience: checking presence first avoids a confusing "invalid format" message for an empty box.
What no combination of these rules can do is confirm that the date belongs to the person filling in the form. Validation checks structure; only verification compares with a source.