Validation rules on database fields
A rule set on a database field that checks each entry, such as a number range, a maximum text length or a drop-down list, and rejects any record that breaks the rule.
Understanding Validation rules on database fields in VCE Spreadsheets, SQL & Visualisation
What it does: Validation text is the message shown when an entry breaks the validation rule. A lookup list creates a drop-down of allowed values, so other entries are rejected. A required field must have a value in it. If you leave it blank, the record is rejected. A validation rule stops invalid data being saved. Hoping people get it right does not. SkaterBoy2024 has 13 characters, which is longer than 10, so it breaks the rule. SkaterBoy has 9 characters and is fine. This validation rule checks the number range and rejects values outside it.
Common mistakes: With Or, every number passes because it is either over 10 or under 15. The rule should use And so only ages from 11 to 14 are accepted. Required: No lets the field be left empty. It should be Required: Yes so a record with no first name is rejected.
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 45–54) and word search (Modules 35–54).
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 ruleFill in the Blanks
Spot the Error
Student with a class code? Join your class →