Validation and verification
Watch the whole lecture free
Make a free account to watch every lecture to the end: 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.
That was the teaching part. The rest of this lecture is free with an account: 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.
No password needed now: we email you a link to set one. Already have an account? Sign in, then come back to this page.
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
- Age: 250?
- Validation
- 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
- Validation and verification 6 min
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.