Rejecting a customer ID that is not stored
A shop's ordering program checks every customer ID entered. It rejects the ID C4071 because no customer with that ID is stored in the customer table. The ID has the correct format.
Which validation check has rejected the ID?
A format check
B range check
C existence check
D presence check
[1]
- 1
Rule out the others. The format is correct, so it is not A. An ID is not a number between two limits, so it is not B. Something was entered, so it is not D.
- 2
An existence check looks the value up in stored data (here the customer table) and rejects it if it is not found. Answer C (1).
Answer
C
Examiner tip
Examiner tip: an existence check is the only validation check that compares the input with data already stored, such as a table of customers, products or postcodes. The others test the input on its own.
Common mistake: choosing A. A format check would accept C4071, because it has the right pattern; the problem is that no such customer exists.