Validation messages and error alerts

Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.

Validation messages and error alerts

Name:
Date:
Class:

Quick Questions

Shade in the A or B circle for each question.

1. Which message appears BEFORE you type, to tell you what to enter in a cell?
A Input message
B Error alert
2. Which message appears AFTER you type data that breaks the validation rule?
A Input message
B Error alert
3. A Stop alert is set on a cell that only accepts ages from 11 to 14. You type 30. What happens?
A The entry is blocked and you must fix it
B The 30 is accepted with a quick note
4. Which alert type lets the user choose to keep a bad entry by clicking Yes?
A Warning
B Stop
5. Which alert type just tells the user about the problem and still lets them click OK to keep the entry?
A Stop
B Information

Match the Pairs

Draw a line connecting each item on the left to its match on the right.

Left columnRight column
1Style: Stop ABlocks the bad entry completely. The user must fix it or cancel before moving on.
2Style: Warning BThe message is not helpful. It does not say what is wrong or what the user should type instead.
3An input message guides the user BEFORE they type, so they know what is allowed CInformation alerts only tell the user something and still allow the bad data. Stop should be used to block it.
4A helpful error message explains what went wrong and how to fix it DTells the user the entry looks wrong but lets them choose to keep it anyway.
5Error message: Bad! EError message: Pick a year level from 7 to 8
6Style: Information (to block negative ages) FInput message: Enter an age from 11 to 14

Definitions

Error alert

Fill in the Blanks

Complete each line of code by filling in the missing parts.

1.
Rule: Whole number between 1 and 100 Error alert style: ____ Message: Enter a whole number from 1 to 100.
2.
Rule: Whole number between 1 and 100 Error alert style: _______ Message: Age should be 1 to 100. Keep it?
3.
Rule: Whole number between 1 and 100 Error alert style: ___________ Message: Only 1 to 100 is expected.
4.
_____ message: Type a mark from 0 to 100 Shows when the cell is selected
5.
Rule: List of Yes,No Error alert style: Stop Error alert _______: Choose Yes or No.

Spot the Error

Shade in the letter of the line that contains an error.

Question 1
A Cell: B2
B Allow: Whole number 11 to 15
C Goal: bad ages must be blocked
D Alert style: Information
E Error message: Use 11 to 15
Question 2
A Allow: Decimal 0 to 100
B Input message: Enter a mark
C Error message: Enter 0 to 10
D Alert style: Stop
Question 3
A Allow: List (Red,Blue,Green)
B Goal: warn but allow others
C Alert style: Stop
D Error message: Not on the list
Question 4
A Cell: C2
B Input message: Age is invalid!
C Allow: Whole number 11 to 15
D Error message: Use 11 to 15
Question 5
A Allow: Whole number 1 to 30
B Alert style: Stop
C Error message: Wrong!
D Input message: Enter 1 to 30

Answer Key

Validation messages and error alerts
Section A: Quick Questions
Q1
A — Input message
Q2
B — Error alert
Q3
A — The entry is blocked and you must fix it
Q4
A — Warning
Q5
B — Information
Section B: Match the Pairs
Q1
Style: Stop → Blocks the bad entry completely. The user must fix it or cancel before moving on.
Q2
Style: Warning → Tells the user the entry looks wrong but lets them choose to keep it anyway.
Q3
An input message guides the user BEFORE they type, so they know what is allowed → Input message: Enter an age from 11 to 14
Q4
A helpful error message explains what went wrong and how to fix it → Error message: Pick a year level from 7 to 8
Q5
Error message: Bad! → The message is not helpful. It does not say what is wrong or what the user should type instead.
Q6
Style: Information (to block negative ages) → Information alerts only tell the user something and still allow the bad data. Stop should be used to block it.
Section C: Definitions
Q1
Error alert — A message that pops up when someone enters data that breaks a validation rule. It can Stop the entry, Warn about it, or give Information, and a good message explains how to fix it.
Section D: Fill in the Blanks
Q1
Rule: Whole number between 1 and 100 Error alert style: Stop Message: Enter a whole number from 1 to 100.
Q2
Rule: Whole number between 1 and 100 Error alert style: Warning Message: Age should be 1 to 100. Keep it?
Q3
Rule: Whole number between 1 and 100 Error alert style: Information Message: Only 1 to 100 is expected.
Q4
Input message: Type a mark from 0 to 100 Shows when the cell is selected
Q5
Rule: List of Yes,No Error alert style: Stop Error alert message: Choose Yes or No.
Section E: Spot the Error
Q1
D — An Information alert lets the bad entry through. The goal is to block bad ages, so the alert style should be Stop.
Q2
C — The error message says 0 to 10, but the rule allows 0 to 100. The message must match the rule: 'Error message: Enter 0 to 100'.
Q3
C — The goal is to warn the user but still allow other entries. A Stop alert refuses them, so the style should be Warning.
Q4
B — An input message appears before the user types and should guide them. Saying the age is invalid sounds like an error. It should say something helpful like 'Type your age'.
Q5
C — A good error message explains how to fix the problem. 'Wrong!' does not say what is allowed. It should be something like 'Pick 1 to 30'.