Chapter 1 - Lesson 5 (Part 1)

Basic ICT tutorials (Information Communication Technology)
2 Jun 202009:20

Summary

TLDRThe video discusses various types of validation rules and verification in computer systems, explaining why validation is necessary. It covers different checks such as presence, range, type, length, format, and lookup checks. These rules ensure that data entered into a system is appropriate, though not necessarily correct. Examples include verifying if required fields are filled (presence check), ensuring data falls within certain limits (range check), or checking if data matches a specific format (format check). The video emphasizes the importance of validating input to maintain data integrity.

Takeaways

  • ✅ Validation ensures that data input into a system is sensible and conforms to defined rules.
  • 📅 An example of validation: A railway season ticket is valid until its expiry date, and this date is checked during validation.
  • ❌ When data is invalid or doesn't conform to rules, it is rejected, and an error message is presented.
  • 🔎 Presence check ensures that necessary data is entered; if not, an error message prompts the user to input the missing data.
  • 📧 Example of a presence check: A contact form that requires an email address but doesn't check if it's formatted correctly.
  • 🔢 Range check ensures that data falls between defined limits, like age being between 18 and 28 for a survey.
  • 📏 Type check ensures that data is of the correct type, such as age being an integer or a grade being text.
  • 🔐 Length check verifies that data is of a specific length, such as a password needing at least 8 characters.
  • 🔤 Format check ensures data follows a required pattern, like an email address having an '@' symbol and proper structure.
  • 📂 Lookup check tests whether data exists in a predefined list, like validating gender as 'male' or 'female'.

Q & A

  • What is the purpose of validation in a computer system?

    -Validation ensures that data entered into a computer system is sensible and conforms to predefined rules, ensuring it is fit for use.

  • Can you give an example of a situation where validation is important?

    -An example is a railway season ticket. The ticket has an expiry date, and the validation rule ensures that the ticket is used before it expires.

  • What happens when data is entered correctly or incorrectly in a validation check?

    -If data conforms to the validation rules, it will be accepted. If it does not, the data will be rejected, and an error message will be displayed.

  • What is a presence check, and how does it work?

    -A presence check ensures that data is entered into a required field. If data is missing, the user receives an error message prompting them to enter the required data.

  • Can you provide an example of a presence check?

    -An example is a login form where you must enter both a username and a password. If the password is left blank, an error message will appear asking the user to input it.

  • What is a range check, and how does it differ from a limit check?

    -A range check ensures that data falls within a specific range, with both a lower and upper boundary. A limit check has only one boundary, ensuring the data meets a single condition, such as being above or below a particular value.

  • Can you give an example of a range check?

    -A range check could be used for the number of students in a class, where the acceptable range might be between 5 and 28.

  • What is a type check, and why is it important?

    -A type check ensures that the data entered is of the correct data type. For example, an age must be an integer, and a price must be numerical. This prevents users from entering incorrect data formats.

  • What is a length check, and can you provide an example?

    -A length check ensures that the data entered is of a specific length. For example, a password might be required to be at least 8 characters long.

  • What is a format check, and how does it function?

    -A format check ensures that data follows a specific pattern or format. For example, an email address must include an '@' symbol followed by a domain. If the data doesn't match the required format, it will be rejected.

  • What is a lookup check, and when would it be used?

    -A lookup check verifies whether the data entered exists in a predefined list or file. For example, when selecting a gender, the system might allow only 'Male' or 'Female' as valid options.

Outlines

00:00

🔍 Introduction to Validation and Verification in Data Entry

This paragraph introduces the topic of validation and verification rules in data entry. It explains the importance of validation when data is input into a system, ensuring that data follows specific rules to be considered sensible. An example is given using a railway season ticket where the expiry date serves as a validation criterion. The process ensures that data entered is valid before further processing, such as rejecting incorrect data with an error message.

05:02

✅ Presence Check in Data Validation

The paragraph discusses presence checks, a validation rule used to ensure that essential data is entered by the user. Examples include login forms where users must provide both a username and password. If a field like the password is left blank, an error message prompts the user to enter the missing data. However, presence checks only confirm that data is entered, not whether it is accurate, as demonstrated by accepting incorrect formats such as nonsensical email addresses.

📊 Range and Limit Checks Explained

This paragraph elaborates on range and limit checks. A range check ensures that data falls within a defined range with both upper and lower boundaries, such as the age of students in a class being between 5 and 28. A limit check, on the other hand, deals with one boundary condition. Examples include minimum age limits for surveys, where only the lower boundary (e.g., age 18) matters. Both types of checks ensure the data is within acceptable parameters before being accepted.

🔠 Type Check: Ensuring Correct Data Types

Here, the focus is on type checks, which verify that the data entered matches the expected data type. For instance, an age must be an integer, a grade must be a letter, and a date of birth must be in date format. This ensures that inputs adhere to predefined types, preventing errors in data processing.

🔢 Length Check: Controlling Data Input Length

This section describes length checks, a validation rule used to ensure that data is of a specified length or falls within a range of lengths. Common examples include setting minimum character limits for passwords (e.g., 8 characters or more) and requiring certain fields like product codes to be of a specific length. This rule ensures that inputs meet the necessary size criteria.

🔤 Format Check: Verifying Data Patterns

The paragraph explains format checks, which validate that the data follows a specific pattern or format. For example, email addresses must contain an '@' symbol, and student IDs must follow a predefined sequence of numbers and letters. If the data does not match the expected pattern, it is rejected, ensuring consistency in the format of inputs.

🔎 Lookup Check: Cross-Referencing Input with Accepted Data

This paragraph discusses lookup checks, a validation process that verifies whether the entered data exists within a predefined list of acceptable values. For instance, when entering gender, the system cross-references the input with a stored list of valid options like 'male' or 'female.' If the input doesn't match any of the acceptable values, the system prompts an error. Another example involves grading systems where only predefined grades such as 'P', 'M', or 'D' are accepted.

Mindmap

Keywords

💡Validation

Validation refers to the process of checking data to ensure that it conforms to predefined rules or criteria. In the video, it is discussed as a necessary step when data is entered into a computer system to ensure the data is sensible. For example, a railway season ticket is considered valid only before its expiration date. The main purpose of validation is to ensure that entered data meets the system’s requirements, though it does not guarantee that the data is correct.

💡Presence Check

A presence check is a type of validation rule that ensures data is entered into a field before submission. In the video, an example is given of a login form where a user might forget to enter their password, and the system would prompt them to do so. The presence check only ensures that something is entered, not whether the entered data is correct.

💡Range Check

A range check ensures that entered data falls within a predefined range of acceptable values. The video explains this with an example of an opinion poll where respondents must be at least 18 years old. The range check would ensure the age is between defined lower and upper limits. For instance, the number of students in a class might be validated to be between 5 and 28.

💡Limit Check

A limit check is a form of validation that ensures data meets a single boundary condition, either a minimum or maximum value. The video describes a limit check as a situation where there is only one boundary involved, such as requiring the age of a person to be at least 18 years. This contrasts with a range check, which involves both upper and lower boundaries.

💡Type Check

A type check ensures that the data entered is of the correct data type (e.g., integer, text, date). In the video, examples include ensuring that an age is entered as a number and not as text, or that a price must be numeric. The type check is important to prevent data from being entered in an invalid form, such as entering letters where numbers are required.

💡Length Check

A length check ensures that the data entered has the correct number of characters. The video mentions the example of a password, where the system might require the password to be at least 6 characters long. Another example given is that a product code must be between 4 and 6 characters long.

💡Format Check

A format check validates that data matches a specified pattern or format. For example, the video describes how an email address must include an ‘@’ symbol with characters before and after it. The format check ensures that the data entered follows the required pattern, such as ensuring a student ID has four numbers followed by two letters.

💡Lookup Check

A lookup check validates entered data against a predefined list of acceptable values. The video provides an example where gender can only be entered as 'male' or 'female.' If the user enters a value outside of this predefined list, such as a different word, the system will return an error. This type of validation ensures that only specific, predefined options are accepted.

💡Error Message

An error message is a notification that informs users when their data fails to meet validation rules. In the video, it is mentioned that if data does not conform to the validation rules, the user will see an error message prompting them to correct the issue. For example, if a required field is left empty, an error message will ask the user to fill it in.

💡Verification

Verification is the process of ensuring that entered data is correct, often through double-checking or confirming accuracy. Although not the primary focus of the video, verification is briefly mentioned as part of ensuring the overall correctness of data, as opposed to just checking that it conforms to certain rules as in validation.

Highlights

Validation ensures that data is sensible and conforms to defined rules, but it does not guarantee the data is correct.

An example of validation: a railway season ticket is valid until its expiry date; using it after expiration makes it invalid.

Presence check: Ensures that data is entered. For example, leaving the password field empty when logging in will prompt an error message.

Presence check only ensures that data is entered, not that the data is correct or in the proper format.

Range check: Ensures data is within a defined range. For example, a survey respondent must be at least 18 years old.

Limit check: A form of range check where there is only one boundary. For instance, grades must be less than or equal to 'E'.

Range check example: The number of students in a class should be between 5 and 28.

Type check: Ensures the data matches a defined data type. For example, an age must be an integer, and a price must be numerical.

Length check: Ensures data is of a defined length or within a range. Example: a password must be at least 8 characters long.

Format check: Ensures data matches a specific format, such as an email address including the '@' symbol followed by additional characters.

Format check example: A student ID must consist of four numbers followed by two letters.

Lookup check: Validates data by checking if it exists in a predefined list. Example: Gender must be either 'Male' or 'Female'.

Lookup check can also be used for qualification grades, ensuring values like 'Pass', 'Merit', or 'Distinction' are entered.

Validation rules help prevent incorrect data from being accepted by a computer system, maintaining data integrity.

Each validation rule, such as presence, range, type, length, format, and lookup checks, plays a crucial role in ensuring data quality and reliability.

Transcripts

play00:00

alright so in this video we're just

play00:01

gonna be looking at validation rules and

play00:04

verification so some of these things you

play00:07

would have seen an IG CC but let's go

play00:10

through these slides and let me know if

play00:12

you have any questions why do we need

play00:14

validation and give an example of a

play00:17

situation so validation takes place when

play00:21

data is input into a computer system the

play00:23

purpose is to ensure the data is

play00:26

sensible and conforms to defined rules

play00:29

so an example if you have a railway

play00:32

season ticket okay that ticket will have

play00:35

an expiry date on it the season ticket

play00:37

is valid until it expires once it

play00:40

expires it is invalid the rule here is

play00:43

that the date the season ticket is used

play00:45

must be before it's expiry date so that

play00:50

is why we need validation and here is an

play00:52

example that will be having a look at

play00:55

specific validation rules when we look

play00:57

through the next few slides

play01:00

so what happens when correct or

play01:02

incorrect data is entered

play01:03

so when data is validated if it conforms

play01:07

to the rules then it will be accepted if

play01:09

it has not conformed to the rules then

play01:11

will be rejected and an error message

play01:13

will be presented validation does not

play01:15

ensure that data is correct so what is a

play01:20

presence check so now we're going to go

play01:21

through the specific validation rules

play01:24

that we can use in our software so

play01:28

princess check is the first one we're

play01:30

going to look at so a presence check is

play01:32

used to ensure the data is entered if

play01:35

data is entered then it is accepted if

play01:38

data is not entered then the user will

play01:40

be presented with an error message

play01:42

asking them to enter data so just think

play01:46

of likely form or like in Gmail or if

play01:50

you login into Facebook or logging into

play01:52

teams if you type in your user name that

play01:56

you leave your password blank and just

play01:59

hit enter it might show a message saying

play02:02

like you have not entered your password

play02:03

so that's an example of a presence check

play02:06

it has to make sure that data that has

play02:08

to be entered is entered by the user

play02:14

so yes I'm examples so infinite in a

play02:17

contact us form on a website

play02:19

it is essential that an email address is

play02:22

entered the following would be valid if

play02:24

only a presence check is carried out so

play02:28

you might not even put a proper e-mail

play02:31

address in but the presence check will

play02:35

accept whatever you enter because it

play02:38

only takes a data is entered so you

play02:40

might say a or a and B etc etc so it

play02:44

doesn't actually make sure that the data

play02:45

you typing in is of the correct form but

play02:49

that at least you've typed something in

play02:52

so notice that none of these are correct

play02:54

but they pass the rule that data must be

play02:56

present so what is a raincheck

play03:00

give examples so raincheck ensures that

play03:03

data is within a defined range so here's

play03:09

some examples an opinion poll was taken

play03:12

and asked for the respondents age the

play03:14

respondents had to be at least 18 years

play03:16

old so the lower boundaries are 18 there

play03:19

is no upper boundary so limit so this is

play03:22

a limit check this could be written as

play03:24

the age of the person must be greater

play03:26

than or equal to 18 so if there's only

play03:29

one boundary involved in your criteria

play03:34

then it's a limit check so the range

play03:38

check is going to be we have two

play03:41

conditions that your values must meet so

play03:45

just have a look at another limit check

play03:46

so letters represent grades for an exam

play03:49

are entered and in the latest a te are

play03:51

valid grades the grade must be less and

play03:54

if the upper boundary is e there is no

play03:58

lower boundary so this is a limit check

play04:00

this could be written as the grade must

play04:02

be less than if and here's an example of

play04:07

the range check the number of students

play04:09

in a class might be between five and

play04:10

twenty eight the lower boundary is 5 the

play04:13

upper boundary is 28 so this is the

play04:16

range check so you can have two

play04:17

conditions the others could be written

play04:19

it as the number of students must be

play04:20

greater equal to 5 and the number of

play04:23

students must be less than or equal to

play04:24

28 so

play04:27

have one condition it's a limit check

play04:28

where we have two conditions

play04:31

it's a range check so what is the type

play04:34

checking give the examples so type check

play04:38

ensures the data must be event a find

play04:39

data type so if an age is entered

play04:45

it must be an integer if a grade is

play04:47

entered

play04:48

it must be text with no numbers if a

play04:51

price is entered it must be numerical

play04:54

and if a date of birth is entered it

play04:57

must be a date so sis to make sure that

play05:01

the data types that are being used are

play05:03

of the correct forms age must be an

play05:05

integer etc says making sure that what

play05:10

you typed in is of the correct the data

play05:13

type what is a length check give

play05:17

examples a length check ensures data is

play05:22

of a defined length or within a range of

play05:25

links so for this example over here if

play05:29

you've ever had to put in a password for

play05:31

an account that you're using you know

play05:33

sometimes it says that you all pass it

play05:35

must be 8 characters or more there's an

play05:38

example of a length check being used to

play05:40

make sure you're giving a password that

play05:42

satisfies that condition so just a

play05:46

number of examples so a parser must be

play05:48

at least 6 characters as long a grade

play05:51

must be exactly one character long it's

play05:53

like a b c d etc product code must be at

play05:58

least 4 characters and no more than 6

play06:00

characters so it's a length check and

play06:03

some examples so what is a format check

play06:08

and give examples so for my check

play06:10

ensures data matches the defined format

play06:13

it sometimes is known as a picture check

play06:16

and the data has to follow a pattern so

play06:20

some examples yes an email address must

play06:23

include an @ symbol preceded by this one

play06:26

character and followed by other

play06:28

characters the following data would be

play06:30

valid so John add B ldef dot C O so as

play06:35

long as there is this @ symbol for the

play06:39

character before it and

play06:40

character after it then the format would

play06:43

be satisfied in this case so student ID

play06:48

is another example so you must say that

play06:50

must be four numbers followed by two

play06:52

letters the following data would be

play06:53

valid so as long as the first four

play06:56

characters are numbers three eight to

play06:58

seven followed by two letters so BD then

play07:02

that data will be accepted so as long as

play07:06

the data that you are putting into the

play07:09

system is of the form that is required

play07:13

then the format check will allow their

play07:15

data B to be accepted but if it's not of

play07:19

that form if maybe the person here put

play07:22

three eight to see BD

play07:24

because the first four characters aren't

play07:27

only numbers it would be rejected so

play07:30

it's a format check and some examples so

play07:35

what is a lookup check and give examples

play07:38

so lookup check test to see if data

play07:40

exists in a list so there is some file

play07:44

that is stored on the system what has

play07:46

valid information or data that is

play07:49

accepted in the field that the user

play07:51

might be typing in so a lookup check

play07:54

tests and checks to see if the data that

play07:58

the user enters in let's say for example

play08:00

in the text box if that data actually

play08:03

exists in the file that the system is

play08:07

storing so let's have a look at some

play08:10

examples so when asking a user they

play08:13

gender they can respond with male or

play08:16

female so lookup validation will check

play08:18

to see if that if the values are within

play08:21

this list so there would be some file it

play08:24

have the information male female formal

play08:27

agenda so someone doesn't type in male

play08:29

or female so they type it something else

play08:32

then whatever happen is a return an

play08:35

error because that gender does not

play08:37

appear in the gender file which would be

play08:40

accepted students taking a qualification

play08:43

could be issued grades of past merit and

play08:45

distinction

play08:46

so in inputting the data a validation

play08:48

rule could check that only X p.m. or D

play08:51

are entered

play08:53

should be a fail so it have these

play08:56

symbols in some file so if you typed in

play08:59

for example let's say C you would notice

play09:03

that C is not part of these symbols okay

play09:05

and these symbols are stored in sound

play09:07

file by the system so if C is not

play09:11

amongst these symbols then the system

play09:14

will give an error message back to the

play09:17

user

Rate This

5.0 / 5 (0 votes)

相关标签
Validation RulesData VerificationPresence CheckRange CheckType CheckFormat CheckData InputError HandlingSoftware ValidationUser Data
您是否需要英文摘要?