Skip to content
IGCSE·Tuition
Computer Science · Lesson

Distinguish verification from validation

Both words sound like checking, and an exam answer can lose marks by swapping them.

On this page
  1. What question does each one answer?
  2. Worked example
  3. The mistake to watch for
  4. Check yourself
  5. Where does this lead next?

Validation checks that data is reasonable and allowed. Verification checks that data is the same as the original or the intended value. They answer two different questions, and exam questions often ask you to explain the difference or name which one a scenario describes.

This lesson builds on choosing a validation rule and sits in the validation, verification and testing module.

What question does each one answer?

ValidationVerification
QuestionIs this data acceptable?Is this data what was meant?
Done byThe program, automaticallyA person or a comparison step
ExampleAge must be 13 to 17Type the email twice and compare
Can it catch a wrong value inside the limits?NoYes

Two common verification methods are double entry (enter the data twice and compare) and a visual check (a person reads the entered data and compares it with the source).

Worked example

A fictional club form is filled in from a paper sheet. The sheet says the member’s age is 15.

One typist presses the wrong key and enters 51. Another typist enters 16 on a different form where the true age is also 15.

Step 1, apply the range check (13 to 17).

TypedTrue agePasses range check?
5115No, 51 > 17, so it is rejected
1615Yes, 13 <= 16 <= 17

Step 2, see what validation did. It caught 51. It could not catch 16, because 16 is reasonable and allowed.

Step 3, apply verification. If the form is entered twice, the first copy says 16 and the second says 15. The comparison finds a mismatch and the typist checks the paper sheet. A visual check against the sheet would also find it.

Conclusion: both are used together. Validation removes impossible values quickly. Verification catches the possible but wrong ones.

A short double-entry comparison in pseudocode:

INPUT FirstEntry
INPUT SecondEntry
IF FirstEntry = SecondEntry THEN
  OUTPUT "Entries match"
ELSE
  OUTPUT "Entries differ, please check the source"
ENDIF

With FirstEntry = 16 and SecondEntry = 15 the condition is FALSE, so the output is “Entries differ, please check the source”.

The mistake to watch for

Mistaken answer: “Validation makes sure the data entered is correct.”

The student treated “valid” as meaning “true”.

Validation only makes sure the data is reasonable. A wrong value that fits the rules passes. Write “reasonable and allowed” or “sensible and within the rules”, and use verification when the idea is matching the source.

Check yourself

1. A program rejects a quantity of -3. Is this validation or verification?

Show answer

Validation. The program automatically decided that -3 is not an allowed quantity.

2. A user types a new password twice and the program compares them. Name the type of check and the method.

Show answer

Verification, by double entry.

3. A form accepts 2012 as a birth year, but the real year was 2021. Which check could still pass it, and which could catch it?

Show answer

A range check could pass it, because 2012 is reasonable. A verification step, such as comparing with the source document, could catch it.

Where does this lead next?

Next, learn to design normal, boundary and invalid test data so you can check that a validation rule really works. You can practise both ideas in the mixed practice set.

If the two words keep swapping in your answers, that is something we work on in online one-to-one Computer Science tuition.

Questions people ask

What is the difference between validation and verification?

Validation is an automatic check that data is reasonable and allowed, such as an age within a range. Verification checks that the data entered matches the original source or what the user meant to type. Valid data can still be wrong, which is why both are used.

What are two methods of verification?

Double entry means typing the data twice, or two people entering it, and comparing the copies. A visual check means a person reads the entered data and compares it with the source on screen or on paper. Both aim to catch typing mistakes.

Can validation make sure data is correct?

No. Validation only checks that data is acceptable, so a wrong value that is inside the allowed limits will pass. If a student types 16 when the true age is 15, a range check from 13 to 17 accepts it. Verification is what can catch that mistake.

Is a password entered twice validation or verification?

It is verification by double entry, because the program compares the two entries to confirm the user typed what they intended. A check that the password has at least 8 characters is validation, because it tests whether the password is acceptable.

Updated:

Your next step

If your definitions are right in your notes but muddled in a timed answer, a one-to-one teacher can drill the contrast with new scenarios until you can choose the right word without thinking.

Paid one-hour trial at your assigned teacher’s confirmed rate, starting from RM80.

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

Parents: enquire here

  • 9,000+ students helped through our service
  • 9+ years helping IGCSE students