Making an Error Message Useful
Retrospective web development exercise for the 2011 archive.
Make a small local form with a title and a message. Submit it with a missing title. The next page should show where the problem happened and preserve the message you already typed. Use a nearby error message and escape submitted values when rendering them back into the form.
Try an empty submission, a title containing quotes, and a successful submission. Notice how each test covers a different part of the flow. A success message confirms the action; an error message should help the person finish it.