Try it on paper first. A hint, the key idea and the worked solution are here when you need them.
Name the check in each case. Say whether it is validation or verification.
Validation checks that data is sensible: range, length, type, presence and format checks, and a check digit. Verification checks that data was entered as intended: a visual check and a double entry check. A validation loop repeats the input, with an error message, until the data is acceptable.
Have you tried it?
Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.
(a) Presence check (validation).
(b) Format check (validation).
(c) Double entry check (verification).
(d) Range check (validation).
(e) Length check (validation).
(f) Visual check (verification).
(g) Type check (validation): the box expects a whole number, and "two" is text.
Watch out. (d) and (e) are easy to mix up. A range check is about the size of a number. A length check counts characters.
Log in to join the discussion.
Loading…