Data validation, verification and authentication

Computer Science · Programming fundamentals

Question 1 of 10

0

    A system rejects any password shorter than 8 characters. Which check is being used?

    Stuck? Read the explanation

    Unlocks at a streak of 5 correct answers in a row.

    Print a free worksheet (PDF)

    Embed this practice on your site or class page

    Paste this HTML into your page. Students practise right there; it is free and needs no account.

    Data validation, verification and authentication explained

    Validation, verification and authentication are three checks that protect the quality and security of data.

    Validation checks that input is sensible before it is accepted. Common validation checks include:

    • Range check: the value lies between a minimum and a maximum.
    • Type check: the data is the right kind, such as a number rather than letters.
    • Length check: the input has the correct number of characters.
    • Presence check: a required field is not left empty.
    • Format check: the input matches a pattern, such as a postcode or date.

    Verification checks that data has been copied or entered correctly. Double entry, where the user types the value twice, and visual checks are common methods. Validation checks whether data is reasonable; verification checks whether it matches what was intended.

    Authentication checks that a user is who they claim to be. It may use something the user knows, such as a password or PIN, something the user has, such as a phone that receives a code, or something the user is, such as a fingerprint. Using two or more of these is called two-factor or multi-factor authentication.

    Worked example

    A form asks for a number of hours worked per week, between 0 and 60. A user types 75 and then enters the same value again in a confirmation box.

    1. The range check fails, because 75 is greater than 60, so the input is rejected.
    2. Double entry is a verification check. It would catch a typing error such as 57 instead of 75, but it cannot tell that 75 is unreasonable.

    What you will practise

    62 multiple-choice questions (Easy, Medium, Hard). Each answer is followed by an explanation.

    Example questions

    • A check that makes sure an exam mark entered is between 0 and 100 inclusive is called a…
    • A check that stops a compulsory surname field from being submitted empty is called a…
    • A check that rejects a telephone number field containing letters, when it should hold only digits, is called a…
    • A system rejects any password shorter than 8 characters. Which check is being used?
    • A drop-down list only lets a user choose a country name that is stored in a table of allowed countries. Which check is this?
    • A date field must be typed as DD/MM/YYYY. Which check tests that an entry follows this pattern?
    • What is a check digit?
    • Entering the same data twice and comparing the two entries to find mismatches is called…

    …and 54 more.