Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

Data Validation and Verification

Validation:
Validation is one way of trying to reduce the number of errors in the data being entered into
your system. Validation is performed by the computer at the point when you enter data. It is the
process of checking the data against the set of validation rules.

Validation aims to make sure that data is sensible, reasonable, complete and within acceptable
boundaries.

Data validation can be performed by using a number of validation checks.

Range Check

A range check is commonly used when you are working with data which consists of numbers,
currency or dates/times.

A range check allows you to set suitable boundaries:

Boundary Description Validation

The maximum price of any item in a shop


Upper limit Less than OR equal to 100
is £100

In a shop, you cannot sell a negative


Lower limit number of items, however you can sell Greater than OR equal to 0
no items

to achieve a B grade you must score Greater than or equal to 75


A range
between 75% - 84% AND Less than or equal to 84
Type Check

When you begin to set up your new system you will choose the most appropriate data type for
each field.

A type check will ensure that the correct type of data is entered into that field. For example, in a
clothes shop, dress sizes may range from 8 to 18. A number data type would be a suitable
choice for this data. By setting the data type as number, only numbers could be entered e.g. 10,
12, 14 and you would prevent anyone trying to enter text such as ‘ten’ or ‘ten and a half’.

Check Digit

This is used when you want to be sure that a range of numbers has been entered correctly.
There are many different schemes (algorithms) for creating check digits.

For example, the ISBN-10 numbering system for books makes use of 'Modulo-11' division. In
modulo division, the answer is the remainder of the division. For example

8 Mod 3 = 2 i.e. the remainder of dividing 8 by 3 is 2.

Consider the ISBN number:

ISBN 1 84146 201 2

The check digit is the final number in the sequence, so in this example it is the final ‘2’.

The computer will perform a complex calculation on all of the numbers and then compare the
answer to the check digit. If both match, it means the data was entered correctly.

Length Check

Sometimes you may have a set of data which always has the same number of characters.

For example, a UK landline telephone number has 11 characters.

A length check could be set up to ensure that exactly 11 numbers are entered into the field. This
type of validation cannot check that the 11 numbers are correct but it can ensure that 10 or 12
numbers aren't entered.

A length check can also be set up to allow characters to be entered within a certain range.

For example, postcodes can be in the form of:

CV45 2RE (7 without a space or 8 with a space) or

B9 3TF (5 without a space or 6 with a space).

So you could set a length check for postcode to accept data which has a minimum number of 5
characters and a maximum number of 8.
Lookup Check

Where you have a field which only allows a limited list of


items to be entered then a lookup list can help to reduce
errors.

For instance, the image opposite shows a 'look-up' list being


used in a spreadsheet that only allows 8, 10, 11 or 12 to be
entered.

For example:

- a shop might put the dress sizes into a lookup list

- a car showroom might put the car models into a lookup list

- a vet might list the most popular types of animals that they deal with

Picture/Format Check

You may see this validation technique referred to as either a picture or a format check, they are
the same thing.

Some types of data will always consist of the same pattern.


Example 1

Think about a postcode. The majority of postcodes look something like this:

CV36 7TP

WR14 5WB

Replace either of those examples with L for any letter which appears and N for any number that
appears and you will end up with:

LLNN NLL

This means that you can set up a picture/format check for something like a postcode field to
ensure that a letter isn't entered where a number should be or a number in place of a letter.
Example 2

A National Insurance number must be in the form of XX 99 99 99 X. The first two and the last
characters must be letters. The other six characters are numbers. Any format entered
differently to this will be rejected.
Presence Check

There might be an important piece of data that you want to make sure is always stored.

For example, a school will always want to know an emergency contact number, a video rental
store might always want to know a customer's address.

A presence check makes sure that a critical field cannot be left blank, it must be filled in. If
someone tries to leave the field blank then an error message will appear and you won't be able
to progress to another record or save any other data which you have entered.

Verification:
Verification means to check that the data on the original source document is identical to the
data that you have entered into the system. Verification can be performed in two ways; double
entry method, visual check.

Double entry

Think about when you choose a new password, you often have to type it in twice. This lets the
computer check if you have typed it exactly the same both times and not made a mistake. It
verifies that the first version is correct by matching it against the second version.
Whilst this can help to identify many mistakes, it is not ideal for large amounts of data.

 It could take a person a lot of time to enter the data twice.


 They could enter the same mistake twice and so it wouldn't get picked up.
 You would end up with two copies of the data.

Visual check

This saves having to enter the data twice. It can help pick up errors where data has been
entered incorrectly or transposed.

However, it isn’t always that easy to keep moving your eyes back and forth between a monitor
and a paper copy. Also, if you are tired or your eyes feel 'blurry' then you might miss errors.

You might also like