State the type of validation check being described in each case. [3]
(a) An exam mark entered must be between 0 and 100.
(b) The username field must not be left empty.
(c) A password must contain at least 8 characters.
- (a) Range check(1)
- (b) Presence check(1)
- (c) Length check(1)
- Answer: (a) Range (b) Presence (c) Length
- Examiner tip: A length check tests the number of characters; a range check tests the size of a value.