Unit 10 · Lesson 3
Build the idea
Start with the concept and its key vocabulary.
Different inputs need different validation. A presence check rejects a blank string. A length check measures characters. A type check asks whether the data has the required type, while a format check examines its pattern, such as DD/MM/YYYY. A look-up check compares input with known allowed values. More than one rule may be needed, and a loop repeats until all required checks pass.
A validation check that ensures data has been entered and is not blank.
A validation check that ensures input has the required number of characters.
A validation check that ensures data has the required data type.
A validation check that ensures data follows a required pattern or structure.
A validation check that compares input with a predefined list of allowed values.