0% found this document useful (0 votes)
220 views5 pages

Worksheet - Validation and Verification

The document discusses different types of data validation methods like range checks, length checks, type checks, format checks and presence checks. It provides examples of using validation methods to check age and height requirements for a fairground ride, length of a password, and marks within a test range. Additionally, it discusses using other validation checks like format checks on a date field and type checks on a patient height field for a hospital patient database.

Uploaded by

Anandhi Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
220 views5 pages

Worksheet - Validation and Verification

The document discusses different types of data validation methods like range checks, length checks, type checks, format checks and presence checks. It provides examples of using validation methods to check age and height requirements for a fairground ride, length of a password, and marks within a test range. Additionally, it discusses using other validation checks like format checks on a date field and type checks on a patient height field for a hospital patient database.

Uploaded by

Anandhi Balaji
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Objective:

• To analyse the different types of data validation.

Task 1:
Identify the appropriate validation method that has been used in the given scenarios:
a)

b)

c)

d)

e)

Extension: For the question (a) to (e) apart from what you have identified, is there any possibility of using
another validation method? If so, describe where you can use and justify your answer.
Task 2:

Complete the following table by explaining how each validation method works and give an example for
each.

Validation method How it works? Example usage

Range Check

Length Check

Type Check

Format Check

Presence Check

Check Digit

Task 3:
Choose any one among the following scenario and write pseudocode for executing the appropriate
validation check:

1) Write pseudocode to check the age and height of a child who wants to go on a fairground ride. The
age must be over 7 and under 12, the height must be over 110 centimeters and under 150
centimeters. (Level 3)
2) Write pseudocode to check that the length of a password is between 8 and 12 characters inclusive.
(Level 2)
3) Write pseudocode to check whether the test marks entered by a teacher is within the range 1 to 100
inclusive. (Level 1)

Task 4:

1)
Extension:
A hospital holds records of its patients in a database. Four of the fields are
• Date of visit (dd/mm/yyyy)
• Patient height (m)
• 8-digit patient ID
• Contact telephone number
The presence check is one possible type of validation check on the data. For each field, give another
validation check that can be performed. Give an example of data which would fail your named validation
check. A different validation check needs to be given for each field.

Field name Name of validation check Example of data which would


fail the validation check

Date of visit

Patient’s height

Patient ID

Contact telephone
number
Challenge:

You might also like