The asset list full of rubbish
A support team keeps a list of every PC in the school. Over a year, people type the tags by hand. Soon there are blank tags, tags with letters where numbers belong, and a room number of 9000.
Checks at the moment of typing would have stopped all of it.
By the end of this lesson
Note
I can choose the right check for a field and write it.
Key words
| Word | What it means |
|---|---|
| Validation | a check that data is sensible when it is entered |
| Verification | a check that data was copied correctly |
| Presence check | is something entered at all? |
| Length check | is the number of characters allowed? |
| Range check | is the number between a low and a high limit? |
| Type check | is it the right kind of data, such as a number? |
| Format check | does it follow the right pattern? |
The cells students fill in are left blank in this preview.
Starter
Have a go
Starter
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.
Five checks, each with a job
Validation checks that data is sensible. It cannot prove the data is true, only that it is possible.
Use the right check for each field. Many fields need more than one.
The five checks
| Check | Asks | Use it for | Example that fails |
|---|---|---|---|
| Presence | Is it there? | A field that must be filled | Empty tag |
| Length | Right number of characters? | Passwords, postcodes, phone numbers | Password of 3 letters |
| Range | Between the limits? | Ages, room numbers, quantities | Room 9000 |
| Type | Right kind of data? | A number field | Letters in a room number |
| Format | Right pattern? | Dates, emails, asset tags | Tag `AB123` with no hyphen |
The cells students fill in are left blank in this preview.
Check
Have a go
Check
3 questionsYour answers are marked here and are not kept. A college account keeps every student’s marks.