Input validation checks whether information satisfies defined acceptance rules, such as a permitted range, required format or maximum length. It cannot prove that a user’s answer is factually true. A PG3 student may write a program that accepts an age of 99 because it lies within the allowed range, even though the real person is 19. The input passes validation but is still wrong.
Parents can help by asking which rule each input must satisfy, what invalid values should be rejected and how a program responds when a check fails. Then distinguish validation from verification, which compares the recorded value with a trusted source or original entry. The 2027 SEC G3 Computing syllabus explicitly includes length, range, presence, format, existence and check-digit validation; these are skills to learn at the school’s actual teaching stage, not a compulsory immediate Secondary 1 assessment.
- Validation tests input against rules; it does not establish truth or trustworthiness.
- Presence checks that a required input is provided; length checks its permitted size.
- Range checks a value against limits; format checks the expected structure.
- An existence check may test whether an entry is already stored in a system, according to the task.
- A check digit helps detect some entry errors but cannot authenticate a person or guarantee all digits are right.
- Test normal, boundary and erroneous values, and design a safe response when a check fails.
Why valid is not the same as correct
Computer systems need rules for accepting data, but a value that follows a rule can still misrepresent reality. A school form may allow ages between 1 and 120. The number 99 passes that numerical range, but it may be an accidental entry when the intended age is 19.
The right question is what the program can know from the data alone. It may know that the value is in an acceptable range, but not necessarily whether the student typed the intended number. Teach the child to avoid writing that validation guarantees accuracy.
A fictional student registration form
Imagine a fictional club-registration form asking for a participant’s display name, age and chosen activity. The display name may need to be present, the age may need to be in a defined range, and the activity may need to match one of the permitted choices. Each input has a different requirement.
Ask the child to write a clear acceptance rule beside each field. Do not begin by writing dozens of lines of Python. Understanding the intended data and constraints is the foundation for implementing checks correctly.
Presence checks: is the required field supplied?
A presence check rejects an entry when a required value is absent, such as an empty display-name field. It does not by itself prove that a nonempty string is meaningful. A field containing only spaces may look nonempty unless the program is designed to remove or reject whitespace appropriately.
Ask the child whether the rule checks a blank value, whitespace, or a genuinely usable name. The exact behaviour depends on the design requirements. An empty string, a missing value and the word ‘none’ can be different cases and should not be treated as identical without reason.
Length checks concern the number of characters
A username rule might require between 4 and 12 characters. A three-character entry fails; a 10-character entry passes the length requirement. The length check alone does not prove that the characters are allowed, that the username is unique or that it belongs to a real person.
Students may confuse the length of text with its numerical value. The string ‘9999’ has four characters even though it represents a number larger than 12. Ask which quantity the check measures before writing a comparison.
Range checks apply to numeric limits
Suppose the fictional registration system accepts ages from 1 through 120 inclusive. A value of 0 should be rejected, 1 accepted, 120 accepted and 121 rejected, after the input has been interpreted correctly as a number. The words inclusive and exclusive matter at the boundaries.
A student who writes an incorrect comparison may accept 121 or reject 120. Have the child express the intended condition in words, then test both boundary values and one just outside each boundary. This catches a common error before the code is used by anyone.
Format checks inspect structure
A format check may require a date to match a stated pattern such as DD/MM/YYYY or a reference number to contain a specified number of digits and letters. It can reject a string that breaks that pattern. But a value matching the pattern can still be impossible or untrue.
For example, ’31/02/2027′ follows a two-digit-day, two-digit-month, four-digit-year character pattern, yet it is not a valid calendar date. A robust system may need additional semantic date checks. This shows the difference between recognising a textual shape and confirming a meaningful value.
Email-looking text does not prove an inbox exists
A field that resembles an email address may satisfy a basic format check while identifying no real mailbox. A valid-looking address might be mistyped or belong to someone else. Real systems sometimes use verification links or other methods to establish control of an address.
Parents should separate the acceptance of syntactically plausible input from proof of ownership. The former is a validation rule; the latter is a separate process requiring additional evidence. Never ask your child to submit real passwords or private addresses to an unapproved practice website.
Existence checks depend on the specification
In the 2027 G3 Computing syllabus, an existence check is described as checking whether input data is already in the system. For a username-registration task, the system might reject a name that another account already uses. In a different task, checking whether a reference exists could be the condition for allowing an update.
The phrase existence check is not a universal instruction to reject every value that already exists. The correct acceptance action depends on whether the program is creating a new record or locating an existing one. Ask the child what the actual use case requires.
What a check digit does
A check digit is calculated from other digits using a defined rule and stored or transmitted with them. Recalculating the check can detect some accidental data-entry changes. The particular algorithm determines which errors can be caught, so a check digit should not be confused with encryption, identity verification or a guarantee of accuracy.
An introductory explanation should focus on the principle rather than require a child to memorise a real financial or identity-number scheme. The syllabus includes calculation of a check digit as one possible validation technique; the question should supply or establish the required method.
A deliberately simple check-digit illustration
Imagine a fictional four-digit code in which the first three digits are chosen and the final digit makes the sum of all four digits divisible by 10. For 1, 2 and 3, the sum is 6, so a final digit of 4 gives a total of 10. The code 1234 therefore passes this invented checksum rule.
If someone swaps the first two digits to make 2134, the sum remains 10 and the code still passes. This demonstrates that a check digit may catch some mistakes but not all. It is a toy example for learning, not the method used by a real official or financial identifier.
Validation versus verification
Validation asks whether a value satisfies stated rules, such as age being within limits. Verification asks whether the captured information matches the intended information or trusted source, such as comparing a record with the original form or confirming a contact channel through an appropriate independent method.
These activities solve different problems. An age of 99 can pass a range check, while a separate comparison with a properly maintained source may reveal that the intended value was 19. Verification also has limitations when the supposed source is wrong. A careful programmer does not claim either process provides absolute certainty.
Why checking twice can still fail
Having a user enter a field twice may help detect a mistyped value if the two entries differ. But someone can repeat the same wrong value twice. Likewise, checking that a code has the correct number of characters cannot establish that it belongs to the intended record.
Ask the child to identify which error the check is designed to catch. Double entry is more useful for catching inconsistent entry than for establishing an externally verified real-world truth. The distinction supports honest system design.
Normal, boundary and invalid test cases
For an inclusive age range of 1 to 120, a normal valid case might be 25. Boundary valid cases include 1 and 120. Invalid cases might include 0, 121, an empty value and text such as ‘abc’. These tests exercise different branches of the validation logic.
Ask your child to write the expected outcome before running the program. If the input is 120, should it be accepted or rejected? If it is blank, will the program request another value or fail? Predicting the result makes debugging purposeful instead of random.
The difference between interactive and non-interactive input
A program asking the user for an age on screen can display a clear error and request a fresh input when the value is invalid. A program processing a file without a user present may instead reject a record, log the issue or stop processing according to its stated requirements.
The 2027 G3 Computing syllabus specifically distinguishes asking for input again for interactive entry and exiting the program for non-interactive input in its learning outcome. Parents should ask what kind of program the exercise describes before selecting the response.
A helpful error message does not expose sensitive data
An error response should explain what the user can correct, such as ‘Enter an age between 1 and 120′. It should not unnecessarily reveal internal system details, other users’ records, passwords or private information. In real applications, validation must be paired with secure design.
Students may focus on producing technically correct code but forget the experience of the person using it. Ask whether someone can understand the message and safely try again without receiving confidential information or misleading instructions.
Do not confuse validation with security protection
Input validation helps programs handle unexpected values, but it is not a substitute for authentication, authorisation, encryption or other security controls. A number that passes a format check does not prove the person entering it has permission to access an account.
Parents can ask which protection addresses the risk described. A range check deals with numeric acceptance; a login process deals with identity and access. Properly distinguishing these roles helps students reason about Computing without assuming one feature solves every cybersecurity problem.
Common beginner Python mistakes
Students may compare numeric input as though it were text, forget to handle conversion errors, use the wrong comparison operator, write a range that excludes the maximum allowed value or fail to repeat a prompt after invalid input. A program may work for one normal input while failing on empty or unexpected data.
Ask the child to trace the first failing case and identify the line where the program’s actual behaviour differs from the intended rule. If the problem is a conversion error, correct the type handling. If the problem is the boundary, correct the condition. Avoid changing several lines simultaneously without a reason.
A fifteen-minute family exercise
Draw a fictional form with display name, age and activity. Spend five minutes choosing a presence, length and range check. Spend five minutes creating normal and boundary tests. In the final five, give a perfectly formatted but factually wrong example and ask what kind of further checking would be needed.
Use imaginary names and values. No account registration, personal identity numbers, passwords or third-party software are needed. A teacher-approved worksheet or simple offline program is sufficient for the learning goal.
Which official syllabus applies
The SEAB 2027 G3 Computing K349 school-candidate register links to the syllabus’s Testing and Debugging outcomes, including validation and specified checks. That examination-year document is for students sitting SEC in 2027, not children entering Secondary 1 in that year. Computing is not offered in the same form by every school.
See the MOE Full SBB information and eduKateSG’s flowchart and algorithm tracing guide and security and privacy guide. The child’s current school task should determine the depth of coding practice.
What a good outcome looks like
A confident learner can distinguish a valid-looking value from a verified correct value, select an appropriate rule, test the boundaries and design a sensible response to invalid input. They also understand why a check digit catches some errors but not every possible mistake.
Ask the Computing teacher to identify whether the child’s gap is recognising validation types, implementing conditions in Python, designing tests or understanding why checks have limits. Focus on that one skill before adding a full project. The aim is careful, independent software reasoning.