Skip to content
IGCSE·Tuition
Computer Science · Help with common difficulties

I confuse validation with verification

Both words sound like checking, so in an exam answer it is easy to write the right idea under the wrong name.

On this page
  1. A test you can use in the exam
  2. Worked example
  3. The mistake to watch for
  4. How to build the habit
  5. Self-check
  6. Where to go next

Validation checks that data is sensible and follows a rule. Verification checks that data matches what was meant to be entered. Validation asks “is this allowed?” and verification asks “is this the same as the source?”

This pair appears in questions about data entry, forms and testing. The wider topic is in validation, verification and testing, and the two ideas are separated in distinguish verification from validation.

A test you can use in the exam

Ask one question about the check: does it need the original?

  • If a program can do the check on its own using a rule (a range, a length, a format), it is validation.
  • If the check compares the entered data with the original source, or with a second entry of the same data, it is verification.

The word “correct” is the trap. Validation never proves data is correct. It only proves the data is acceptable.

Worked example

A school library form asks for a student’s year group, which must be a whole number from 7 to 13. The student’s real year group is 10.

What the user typesValidation (range 7 to 13)Verification (type it twice)
10 then 10AcceptedEntries match, accepted
1 then 1Rejected, out of rangeNot reached
12 then 12AcceptedEntries match, accepted
10 then 1First value acceptedEntries differ, rejected

Step 1. The value 1 fails validation because the rule says 7 to 13. The program needed no original to decide this.

Step 2. The value 12 passes validation, although the real year group is 10. The rule cannot know the truth.

Step 3. Typing twice does not catch 12 and 12 either, because a person can repeat the same slip. Verification reduces typing errors but is not perfect. Checking the form against the student’s record would catch it.

So: validation caught an impossible value, verification caught a mismatch between two entries, and neither proves the value is true.

The mistake to watch for

Mistaken answer: “Validation checks the data is correct, and verification checks it is entered properly.”

This sounds close but fails on both counts. Validation does not check correctness, as the year 12 example shows. Verification is about agreement with the intended data, not about “entering properly”.

Correction: “Validation checks the data is reasonable and meets a rule, for example a range check that rejects 1. Verification checks the entered data matches the source, for example by entering it twice and comparing.”

How to build the habit

  1. For each check you meet, write the name (range, length, double entry) and one line: “needs the original: yes or no”.
  2. Add a scenario of your own, not the textbook one.
  3. Say the difference aloud in one sentence before you look at the answer.

You can rehearse the step-by-step reasoning on small original examples with the pseudocode trace trainer and the Python reasoning sandbox.

Self-check

1. A sign-up form rejects a username with fewer than 6 characters. Validation or verification, and which check?

Show answerValidation. It is a length check, because a rule is applied without comparing the input to any original.

2. A clerk reads each typed record back against the paper form. Validation or verification?

Show answerVerification. The entered data is compared with the source document to see whether it matches.

3. A user enters their age as 140. Which check stops it, and why might 41 typed by mistake as 14 still get through?

Show answerA range check stops 140. The value 14 is inside a sensible range, so validation accepts it, even though it is not what the user meant. Only verification against the source would catch it.

Where to go next

Practise designing checks in choose a validation rule from a requirement and then design normal, boundary and invalid test data.

For students who want a teacher to correct the wording of their answers as they write them, online one-to-one Computer Science tuition starts with a paid trial lesson from RM80.

Questions people ask

Does validation prove the data is correct?

No. Validation only checks that data is reasonable and follows a rule, such as a range, a length or a type. A wrong age of 15 instead of 14 passes a range check from 11 to 18. Only checking against the source, which is verification, can catch that kind of error.

Is a double-entry check validation or verification?

Verification. Typing the same value twice and comparing the two entries checks that what was entered matches what was intended. Note that it does not check sense: two identical wrong entries would still pass.

Can a system use both at once?

Yes, and good systems do. A form can reject an impossible age with a range check (validation) and also ask the user to retype the email address (verification). Each catches a different kind of mistake.

What are common validation checks to name in an answer?

Range check, length check, type check, presence check and format check are the usual ones. Name the check and say what it tests in the scenario, for example a length check that rejects a password shorter than eight characters.

Updated:

Your next step

If the two terms keep swapping places in your answers, a one-to-one teacher can give you fresh scenarios until the difference is automatic, and listen to how you explain each one.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80. Other fees, schedules and ongoing arrangements are confirmed directly with your teacher after the trial class.

Tuition is arranged with a parent or guardian. Send them this page on WhatsApp and they can enquire for you.

Parent or guardian? Enquire here

9,000+ students helped through our service