Validation Checks Flashcards
What is a validation check?
Validation is a process to check that input data is reasonable or sensible. Frequently used validation algorithms include:
Presence check
Used to prevent further progress if a required field is left blank.
Format checks
Used to ensure data matches a specific pattern, such as dd/mm/yyyy for a date. Input masks are often used to create format checks on database forms.
Length checks
Used to ensure an input data string is a sensible length, e.g. number of characters in ‘firstName’ to be between 3 and 16
Type check
Used to ensure input data is a particular data type, e.g. quantity ordered to be integer or cost to be real.
Range checks
Used to ensure input data lies within a specified range, e.g. over time hours to be > 0 and < 15.