← VCE Software Development U3O1

Types of validation check

A test that an entry is sensible. Types include presence, data type, range, length, format and list. Each one tests a different property of the entry.

Understanding Types of validation check in VCE Software Development U3O1

What it does: LEN counts the characters in the entry, so this tests its length. ISNUMBER tests the data type of the entry, which is a type check. A presence check makes sure something has been entered. It does not test what the entry says, only that it is not blank. A range check tests that a number falls between a lowest and highest allowed value.

Common mistakes: This presence check is reversed. It marks the entry invalid when a name IS entered. It should be IF name = "" THEN, so only a blank entry is rejected. A range check needs AND so the age is both at least 0 and at most 99. With OR, every number passes, so the check never rejects anything.

Class: _____________________  ·  Name: _____________________  ·  Date: _________

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 114–124) and word search (Modules 114–141).

Take this worksheet further — free with Cloodit

Each concept is reinforced from every angle — learned, then applied, then tested.

Learning
Duo
A form will not let you submit if the Surname box is empty. Which validation check is this?
Range checkPresence check
Matches
Range check on Age: allow only the whole numbers 0 and 120
↓
A range check allows every value between a lowest and a highest limit, not just the two end values. Age should be allowed from 0 to 120 inclusive.
Applying
Meanings
Term
validation check
Meaning
A test that an entry is sensible. Types include presence, data type, range, length, format and list. Each one tests a different property of the entry.
Practice
=NOT(ISBLANK(A2))
Testing
Gaps
=NOT((A2))
Check Answer
Spots
2valid ← TRUE
3IF name <> "" THEN

Cloodit turns curriculum-aligned coding content into journeys students work through one biome at a time.

The 'Pufferfish' badge — Error Handler, one of Cloodit's 106 collectible badges
Students earn collectable badges

Over 100 of them, across seven natural biomes.

Study Buddy
Students build a real study resource

Turns their work into revision material ready for Flash Cards and Exam study.

Diamond Dash — one of Cloodit's live, competitive Sprint games
Students lock in with Sprints

Live, competitive practice for the start of the lesson or a teacher-led lesson finisher.

A Cloodit certificate of achievement, ready to personalise and print
Custom printable certificates

Honour your top performers, or encourage a student who's trying hard — ready to print in seconds.

Quick Questions

1. A form will not let you submit if the Surname box is empty. Which validation check is this?
A. Presence check ✓
B. Range check
A presence check makes sure something has been entered. It does not test what the entry says, only that it is not blank.
2. A school canteen app only accepts a quantity between 1 and 20. Which check is this?
A. Range check ✓
B. Presence check
A range check tests that a number falls between a lowest and highest allowed value.
3. Which entry would fail a type check on an Age field that must be a whole number?
A. fifteen ✓
B. 15
A type check tests the kind of data entered. The word 'fifteen' is text, not a number, so it fails. 15 is a whole number and passes.
4. A Year Level field must be a number from 7 to 12. A student types 14. Which check rejects it?
A. Type check
B. Range check ✓
14 is a number, so it passes the type check. It is outside 7 to 12, so the range check rejects it.
5. An Australian postcode must be exactly 4 digits. Which entry fails a length check?
A. 3051
B. 305 ✓
A length check counts the characters. 305 has only 3 digits, so it fails. 3051 has 4 digits, so it passes.

Match the Pairs

=IF(ISBLANK(A2),"Missing","OK") → A presence check: tests that the cell is not left empty
=IF(AND(B2>=0,B2<=100),"OK","Error") → A range check: tests that a number is between 0 and 100
A length check tests that text has the right number of characters, such as a 4-digit postcode → =IF(LEN(C2)=4,"OK","Error")
A type check tests that an entry is the right kind of data, such as a number rather than text → =IF(ISNUMBER(D2),"OK","Error")
Range check on Age: allow only the whole numbers 0 and 120 → A range check allows every value between a lowest and a highest limit, not just the two end values. Age should be allowed from 0 to 120 inclusive.
List check on Year level: use a presence check to accept only 9 or 10 → A presence check only tests that something was entered. To accept only 9 or 10, you need a list check.

Key Term

validation check
A test that an entry is sensible. Types include presence, data type, range, length, format and list. Each one tests a different property of the entry.

Fill in the Blanks

1. =NOT(ISBLANK(A2))
Hint: Type the function that tests whether a cell is empty. This is a presence check.
2. =AND(B2>=0,B2<=100)
Hint: Type the comparison operator that keeps a mark at or below the upper limit. This is a range check.
3. =ISNUMBER(C2)
Hint: Type the function that tests whether the entry is a number. This is a data type check.
4. =AND(LEN(D2)=10,LEFT(D2,2)="04")
Hint: Type the function that takes the first characters of the entry so its format can be checked. The LEN part is the length check.
5. =COUNTIF(G2:G5,E2)>0
Hint: Type the function that counts how many times the entry appears in the approved list. This is a list check.

Spot the Error

Question 1
A INPUT name
B valid ← TRUE
C IF name <> "" THEN
D valid ← FALSE
E ENDIF
Line C — This presence check is reversed. It marks the entry invalid when a name IS entered. It should be IF name = "" THEN, so only a blank entry is rejected.
Question 2
A INPUT age
B IF age >= 0 OR age <= 99 THEN
C OUTPUT "Accepted"
D ELSE
E OUTPUT "Out of range"
F ENDIF
Line B — A range check needs AND so the age is both at least 0 and at most 99. With OR, every number passes, so the check never rejects anything.
Question 3
A INPUT quantity
B IF ISTEXT(quantity) THEN
C OUTPUT "Valid number"
D ELSE
E OUTPUT "Numbers only"
Line B — A quantity must be a number, so the type check should use ISNUMBER(quantity). ISTEXT would accept words and reject real quantities.
Question 4
A INPUT postcode
B size ← LENGTH(postcode)
C IF size > 4 THEN
D OUTPUT "Length OK"
E ELSE
F OUTPUT "Must be 4 digits"
Line C — An Australian postcode must be exactly 4 characters long. The length check should be IF size = 4 THEN. Testing size > 4 would accept only longer entries and reject valid postcodes.
Question 5
A INPUT team
B teams ← ["Red","Blue","Gold"]
C valid ← FALSE
D IF team = teams THEN
E valid ← TRUE
F ENDIF
Line D — A list check must test whether the entry is a member of the list, using IN. Comparing team = teams compares one value with the whole list, so it is never true.

Student with a class code? Join your class →