Validation Flashcards
What happens if data isn’t validated?
if inputted data doesn’t follow the rules it is rejected
this reduces the risk that incorrectly entered data might crash a program
range check
the data must fall within a specified range
can apply to numbers and characters
length check
the input must not be too long or too short
presence check
a data value must be entered
format check
the data must be in the correct format, such as entering a date in the format DD/MM/YYYY
type check
the data must be of a specific data type, such as an integer
What does validation not do?
ensure that data entered is correct
verification checks
repeat the entered data to the user and ask them to confirm if it is correct
this helps reduce errors from incorrect data