The Bouncer at the Door
The Bouncer at the Door
Computer Science glossary
- What is validation?
- Checking input data is sensible and follows rules before processing
- What is a type check?
- Checking data is the correct data type (e.g., integer not text)
Earn the mark scheme marks
Exam Tips
- Validation ≠ Verification: Validation checks data is sensible; verification checks it's what user intended (e.g., enter twice)
- Doesn't prove accuracy: Data can be valid but wrong (fake name passes validation)
- Combine checks: Often need multiple validation types for one field
Now try it yourself
Quiz · Question 1 of 15
A program asks the user to enter a score between 1 and 10. Which validation check should be used to ensure the number is within this range?
Tap an answer to check it
This topic in real past papers
Every real exam question we've found on input validation, with a full worked answer.
AQA Paper 1
Both sittings we have full papers for ask you to write an indefinite iteration loop that keeps re-prompting the user until their input meets a stated rule, worth 4 to 6 marks.
OCR Paper 2
All three sittings we have full papers for test input validation, worth 4 to 6 marks: writing a full validation program checking three separate rules in June 2022, naming and explaining two validation methods in prose in June 2023, and writing a validation check with a compound boundary condition in June 2024.