Form Validation Copy
5 exercises — Practice writing validation messages that guide users to correct input: count-based errors, inline validation, password checklists, multi-error summaries, and sensitive age-gating.
0 / 5 completed
1 / 5
A credit card number field shows this validation message when a user enters 15 digits: "Invalid input." What should replace it?
Form validation messages are most helpful when they tell users exactly what went wrong and what the correct value should be.
Analysis:
• Option A — "valid credit card number" is vague; tells them nothing specific about the error
• Option B — too long and formal; "expected format" is developer language
• Option C ✓ — tells the rule (16 digits) AND what they entered (15 digits) — maximum specificity
• Option D — correct but missing the diagnostic ("you entered 15") that helps users understand the mistake
The gold standard for count-based validation: state the required count AND the current count.
Other examples:
• "Password must be at least 8 characters. Yours is 6."
• "Title can be up to 60 characters. You've used 63."
Key vocabulary:
• Validation message — inline feedback explaining why input was rejected
• Diagnostic copy — validation text that tells users what they actually entered vs. what was expected
• Character/digit count feedback — showing current vs. required count in validation messages
• Specific constraint — naming the exact rule being violated, not a generic error
Analysis:
• Option A — "valid credit card number" is vague; tells them nothing specific about the error
• Option B — too long and formal; "expected format" is developer language
• Option C ✓ — tells the rule (16 digits) AND what they entered (15 digits) — maximum specificity
• Option D — correct but missing the diagnostic ("you entered 15") that helps users understand the mistake
The gold standard for count-based validation: state the required count AND the current count.
Other examples:
• "Password must be at least 8 characters. Yours is 6."
• "Title can be up to 60 characters. You've used 63."
Key vocabulary:
• Validation message — inline feedback explaining why input was rejected
• Diagnostic copy — validation text that tells users what they actually entered vs. what was expected
• Character/digit count feedback — showing current vs. required count in validation messages
• Specific constraint — naming the exact rule being violated, not a generic error
Next up: Empty State Copy →