Validation, Verification and Testing: Question 1

Syllabus 7.5

Multiple choice 1 mark

A membership renewal form for a chess club will not let a member submit the form until the MemberNumber field has been typed into. The form cannot be submitted while this field is left empty, no matter what else has been entered correctly.

Which type of validation check is being applied to the MemberNumber field here?

Choose an answer to check it, then compare with the worked solution below.

Show worked solution Hide worked solution

Worked solution

Step 1: Work out exactly what rule is being described

The scenario says the form “cannot be submitted while this field is left empty”. Nothing is said about how many characters MemberNumber should contain, what pattern it should follow, or what numeric limits apply. The only rule given is that something must be typed in.

Step 2: Match the rule to a validation check

  • A presence check simply confirms that data has been entered into a field at all. It doesn’t matter what the data is, only that the field isn’t blank.
  • A length check counts the number of characters entered and compares this to a required count.
  • A format check compares the entered data against a required pattern or layout (for example, two letters followed by four digits).
  • A range check tests whether a numeric value falls between an upper and lower limit.

Step 3: Rule out the distractors

Since no size, pattern, or numeric limit is mentioned anywhere in the scenario, a length check, a format check, and a range check are all testing something that simply isn’t part of this rule. The only property being tested is whether the field has been left empty.

Final answer

The rule described, “cannot be submitted while this field is left empty”, is a presence check, option C.