Validation & Verification
Please note that none of these pseudocode examples are 100% correct (referring to syntax - as in the technical way to write it) but the idea is to show you how the methods work.
Validation
This an automated process where a computer checks if input value by the user meets the program's requirements to run (e.g. if a str variable is used, it makes sure that the user enters a string not an integer, Boolean or a float/real value so that the program can run without errors).
There are 6 main ones you need to know (range, length, type, present, format checks, and check digits)
Range Check
This will ensure a particular number falls within a required range.
Length Check
This will check the length of a string (e.g. a password to ensure that its at least 8 characters long)
Type Check
This will check what type of data you've entered whether it's a Boolean, string, or integer.
Presence Check
Checks to see if you've entered data into a field or not (e.g. required * fields on an online form)
Format Check
This will ensure that data has been inputted in the correct format (e.g. say you want their date of birth, but you want the day first, then the month, then the year). It's done using pattern matching and string handling.
Check Digits
If you're unsure about what these are, look here as I've explained them already.
Verification
This is to check whether data is accurate or not when entered into a system. There are two main methods which you need to be aware of (double entry checking and visual checks).
Double Entry Checking
This involves entering the data twice (e.g. when resetting a password or entering your email). You have to input data into two seperate variables and then check both to see if they match. If they do not match, then both inputs are not the same, so the user has incorrectly entered data.
Visual Checks
This is where you trust the human to check the data they're inputting without any actual data checking via an algorithm or check.
A pop-up should appear before they are allowed to enter the data. If they select that the data is correct, then the data is appended to the variable. If not, then the data is re-inputted before being appended to the variable.
Test Data
There are 4 types of test data:
Normal Data (should be accepted in the program, well within the boundary)
Abnormal Data (should not be accepted in the program, outside the boundary)
Extreme Data (a form of boundary data, tests the max. and min. value of a program)
Boundary Data (where you test the max. and min. values but withing the acceptable and not acceptable range - e.g. if my range is between 0 and 100, I'll have 4 numbers as boundary data which are -1, 0, 100, and 101 - generally boundary and extreme data are the same)
Last updated