ExamYard Lectures

Validation and verification

IGCSE Computer Science 0478 · Chapter 7.5, Validation and verification · 6-minute lecture

The teaching part (1 min) is free to watch. A free account opens the whole lecture: 7 practice questions, 2 real past-paper questions with the answers explained, the mistakes that lose marks, the full-marks tip, a one-card summary and a quick quiz.

What this lecture covers

  1. Age: 250?
  2. Validation
  3. The six validation checks
Read the transcript of the teaching part

Last time

Before we start: last time, in Standard methods, you learned these points. Here they are again on one card. Keep them in mind, because today builds on them.

Age: 250?

Somebody types their age as two hundred and fifty. A sensible program should refuse it. That refusal is validation. But what if they type forty-five instead of fifty-four? That is a different kind of mistake, and it needs a different check: verification.

Validation

Validation is an automatic check that the data entered is reasonable. The computer checks it against rules before it accepts it. Validation cannot check that the data is correct, only that it is sensible. There are six checks to learn.

The six validation checks

A range check tests that a value is between two limits. A length check tests the number of characters. A type check tests the data type, for example a whole number. A presence check tests that something was entered. A format check tests a pattern. And a check digit is an extra digit worked out from the others.

How often it comes up

The whole chapter: Validation and Verification.

Chapter 7.5: Validation and verification

Also for IGCSE Computer Science 0478

Which topics come up most in IGCSE Computer Science 0478 past papers, counted from every paper since 2004: Paper 1 topic frequency, Paper 2 topic frequency.

The topical past-paper books: Paper 1, Paper 2.