KwickAcademy Course Topics · 6 min · free
Validation, verification and suitable test data
Validation checks data is sensible; verification checks it is accurate. Test data covers normal, abnormal, extreme and boundary values.
Follows the syllabus of: Cambridge IGCSE Grade 9 Computer Science (0478)
On screen in this lesson
Validation vs verification
| Check | Validation | Verification |
|---|---|---|
| Asks | is it sensible? | is it accurate? |
| Done by | the program | double entry |
| Catches age 200 | yes | maybe |
| Catches 15 as 16 | no | yes |
Validation checks: part 1
| Check | Makes sure | Example |
|---|---|---|
| Range | within limits | mark 0 to 100 |
| Length | right no. of chars | 10-digit mobile |
| Type | right data type | age is integer |
Validation checks: part 2
| Check | Makes sure | Example |
|---|---|---|
| Presence | not left empty | name entered |
| Format | follows a pattern | DD/MM/YYYY |
| Check digit | code is correct | last digit ISBN |
Verification methods
| Double entry: type twice, computer compares |
| Mismatch: enter the data again |
| Visual check: compare with the original |
| Example: read your form before submit |
Why we need test data
| Chosen on purpose, not at random |
| Values that should be accepted |
| Values that should be rejected |
| Values at the edges of the rules |
Four types of test data
| Type | Meaning | Result |
|---|---|---|
| Normal | sensible value | accepted |
| Abnormal | wrong value or type | rejected |
| Extreme | largest or smallest | accepted |
| Boundary | both sides of limit | one each |
Quick answers
Is a mark of 100 accepted with Mark <= 100?
Yes. <= includes 100.
62 typed instead of 60 passes validation. What catches it?
Verification.
KwickClips from this lesson
Short clips, one idea each. Good for revision the night before.
The full lesson, in text
Hello students, welcome to Kwickprep. A student types their age as two hundred. The computer accepts it. What went wrong? Today we will learn validation, verification and how to choose suitable test data, three topics exams love.
These two words sound alike, so let us separate them first. Validation is an automatic check by the program that data is sensible and follows the rules. Verification is a check that data has been copied or entered accurately, matching the original. Validation cannot tell if a sensible value is wrong. An age of fifteen typed as sixteen passes validation, but verification can catch it.
There are six validation checks to learn, and here are the first three. A range check makes sure a value is between a lower and an upper limit, like a mark from zero to one hundred. A length check makes sure data has the right number of characters, like a ten digit mobile number. A type check makes sure data is the right data type, like a whole number for age.
Here are the other three checks. A presence check makes sure data has actually been entered, so a required box is not empty. A format check makes sure data follows a set pattern, like a date written as day, month and year. A check digit is an extra digit at the end of a code, like the last digit of a book's ISBN. It is worked out from the other digits, so typing mistakes can be detected.
Here is a range check written as a loop, which exams often ask for. The Repeat loop asks the user for a mark. Until checks that the mark is zero or more and one hundred or less. If the mark is outside the range, the loop runs again. So the program only continues with a valid mark.
Here is a length check for a ten digit mobile number. The number is stored as a string, which is text, so leading zeros are kept. LENGTH gives the number of characters in the string. While the length is not ten, the user is asked again. The condition is checked before each repeat, so a correct number is accepted without asking again.
Now verification, which checks accuracy, not sense. In double entry, the data is typed twice, and the computer compares the two copies. If the copies do not match, the user must enter it again, like typing a new password twice. In a visual check, a person compares the data on screen with the original document. For example, you read your exam form carefully before you submit it.
To check that validation really works, we test the program with planned data. Test data is data chosen to check that a program works correctly. It must test values that should be accepted. It must also test values that should be rejected. And it must test the values at the very edges of the rules, where most mistakes hide.
There are four types of test data. Normal data is sensible data that should be accepted. Abnormal data, also called erroneous data, should be rejected. Extreme data is the largest or smallest value that is still accepted. Boundary data tests both sides of a limit, the last accepted value and the first rejected value.
Let us choose test data for a mark from zero to one hundred. Normal data could be fifty five. Abnormal data could be minus ten, or the word fifty. Extreme data is zero and one hundred, the smallest and largest valid values. Boundary data for the top limit is one hundred, which is accepted, and one hundred and one, which is rejected.
Pause and predict using the range check loop. The user types exactly one hundred. Is it accepted? Yes, because less than or equal to includes one hundred. Now the user types one hundred and one, and the loop asks for the mark again.
One last exam point. Validation only checks that data is sensible, not that it is true. A mark of sixty two passes the range check even if the real mark was sixty. Only verification or a human check can catch that mistake. That is why good systems use both validation and verification together.
Let us revise today's lesson. Validation is an automatic check that data is sensible. The six checks are range, length, type, presence, format and check digit. Verification checks accuracy, by double entry or a visual check. Test data types are normal, abnormal, extreme and boundary. Use both validation and verification together.
Courses that teach this
| Course | Unit |
|---|---|
| Cambridge IGCSE Grade 9 Computer Science (0478) | 7. Algorithm Design and Problem-Solving |
Voice-over in this lesson is AI-generated. The script is written and checked by Kajal Ma'am. Boards can revise a syllabus mid-year, so confirm anything you plan around against the official board circular. Keep your passwords, OTPs and ID numbers to yourself — we never ask for them. To reach Kajal Ma'am, use the WhatsApp button; sharing your number there is how we call you back.
Free to watch, no sign-up. Live classes with Kajal Ma'am are the paid course; these lessons stay free either way.


