6. 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.

 

challenge see if you can find out one extra fact on this topic that we haven't already told you

Click on this link: Data validation commercial database