Choosing a validation check for each field
A rule that tests data on entry. Pick the one that fits each field: range for a mark, length for a phone number, presence for a required name, list for a year group.
Understanding Choosing a validation check for each field in IGCSE Computer Science Paper 2
What it does: A presence check only tests that something has been entered, which is exactly what a required name needs. Age is a number with a lowest and highest allowed value, so a range check fits. Listing every allowed age would be longer and less suitable. A mark has a sensible minimum and maximum, so a range check is the best fit and rejects values such as 150 or -5. A phone number always has a fixed number of digits, so a length check catches numbers that are too short or too long.
Common mistakes: A mark is a number that must fall between limits, so it needs a range check. A length check counts characters and does not test the size of a value. It should be 'Check: range check'. A length check should reject a phone number whose length is wrong. Using = would show the error for valid numbers. It should be IF LEN(Phone) <> 11 THEN.
Free printable worksheet with full answer key — or add this module to a class and your students practise it interactively.
This module's key terms are also in a printable crossword (Modules 500–522) and word search (Modules 500–538).
Take this worksheet further — free with Cloodit
Each concept is reinforced from every angle — learned, then applied, then tested.
Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.
Over 100 of them, across seven natural biomes.
Turns their work into revision material ready for Flash Cards and Exam study.
Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.
Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.
Quick Questions
Match the Pairs
Key Term
validation checkFill in the Blanks
Spot the Error
Student with a class code? Join your class →