Validation and verification GCSE computer science questions test two separate ideas: validation checks that data entered into a program follows sensible rules, while verification checks that data was copied or transferred correctly, without being changed by mistake. Neither check can guarantee the data is actually true — only that it is plausible or accurately transferred.
What is data validation?
Validation is an automatic check, built into a program, that rejects data which fails to meet a defined rule before it is accepted or stored. If the data fails the rule, the program refuses it and (usually) asks the user to try again.
Validation cannot tell whether data is correct — only whether it is reasonable. A validation check on a student's age might accept any whole number from 11 to 19; it would happily accept "13" even if the actual student is 14, because 13 still satisfies the rule.
What are the main types of validation check at GCSE?
GCSE specifications list several standard validation checks, each suited to a different kind of mistake:
| Check | What it does | Example |
|---|---|---|
| Range check | Confirms a number falls between a minimum and maximum | Age must be between 11 and 19 |
| Length check | Confirms text has an acceptable number of characters | A UK postcode must be between 5 and 8 characters |
| Presence check | Confirms a required field has not been left blank | A form cannot be submitted with an empty "surname" box |
| Type check | Confirms the data entered is of the expected type | A "quantity" field must contain a whole number, not text |
| Format check | Confirms data matches an expected pattern | An email address must contain "@" and a domain |
| Check digit | Confirms a code (like a barcode) matches a calculated digit | The final digit of an ISBN is calculated from the others |
Worked example: a program collects a student's exam mark, which must be a whole number from 0 to 100. A student types "150". A range check compares 150 against the rule (0–100); because 150 is greater than the maximum, the check fails, and the program displays an error message such as "Enter a mark between 0 and 100" instead of storing the invalid value.
What is data verification?
Verification checks that data has been copied, entered or transferred accurately, matching its original source — it is about accuracy of transfer, not plausibility. GCSE specifications generally cover two verification methods:
- Visual checking — a human compares the data on screen against the original source document to spot mistakes by eye.
- Double data entry — the same data is typed in twice, often by two different people or on two separate occasions, and a program compares the two entries. If they don't match exactly, the system flags a possible error rather than saving either version.
Double data entry is common wherever accuracy is critical, such as typing a password twice during account creation, or re-keying medical or financial records, because it catches typing slips that a validation rule would never notice — a mistyped but still "valid" value.
What is the difference between validation and verification?
Students frequently mix these two up in exam answers, so the distinction is worth learning precisely.
| Feature | Validation | Verification |
|---|---|---|
| Purpose | Checks data is sensible, following a defined rule | Checks data matches its original source exactly |
| Performed by | The program automatically | A person (visual check) or the system (double entry) |
| Can it catch a "plausible but wrong" value? | No | Yes, if compared against the original |
| Example | Rejecting an age of 200 | Retyping a password to confirm it matches |
| Guarantees accuracy? | No — only plausibility | No — only that transfer/entry matches the source |
Why does a program need both validation and verification?
Neither check alone catches every kind of error. Validation would happily accept a wrongly typed but still plausible age — entering "15" instead of the intended "16" passes a range check without complaint, since both numbers sit inside 11–19. Verification, through double entry, would only catch that mistake if the two entries genuinely differed.
Using both together closes more gaps than either check on its own: validation filters out impossible or unreasonable values immediately, while verification confirms that what was actually typed matches what was intended. A well-designed system, such as an online enrolment form, typically applies validation to every field as it's typed and verification (like a "confirm password" box) on the most sensitive fields.
Frequently asked questions
What is the difference between validation and verification in GCSE computer science?
Validation is an automatic check, built into a program, that rejects data failing to meet a defined rule — such as a range, length or presence check. Verification checks that data has been copied or entered accurately compared with its original source, usually through visual checking or double data entry. Validation checks plausibility; verification checks accuracy of transfer.
What are the main types of validation check?
The main validation checks are range check (value falls between a minimum and maximum), length check (text has an acceptable number of characters), presence check (a required field is not blank), type check (data is the correct data type), format check (data matches an expected pattern, like an email address), and check digit (a calculated digit confirms a code hasn't been mistyped).
Can validation guarantee that data is correct?
No. Validation only confirms that data is plausible according to a defined rule — for example, that an age falls between 11 and 19. It cannot know whether the value entered is actually true for that particular person, since a wrong but still reasonable value will pass the check without being flagged.
What is double data entry and when is it used?
Double data entry is a verification method where the same data is typed in twice — often a password, or a sensitive record — and a program compares the two entries. If they don't match, an error is flagged rather than either value being accepted. It is commonly used wherever a typing mistake would be costly, such as password confirmation or transcribing medical records.
For Socratic GCSE Computer Science tutoring — programming, algorithms, and more — visit aitutors.me.