4

When building an application should all validation messages have punctuation?

  • 3
    It's completely arbitrary IMO. – Jeff Busby Mar 4 '11 at 20:09
  • What is this question about? I don't understand it. Is it to much to ask for an example? – Martin Wickman Mar 4 '11 at 20:54
  • 3
    @Martin Wickman I think he means: "Error: please enter your first name" versus "Error: please enter your first name." Notice the period in the second statement. – davidhaskins Mar 4 '11 at 21:03
  • @davidhaskins or even "Please enter your first name" instead of "Error: please enter your first name" – jamiebarrow Mar 18 '11 at 7:00
21

Validation messages should be clear, consistent, and literate. Punctuation can be used to accomplish these ends.

| improve this answer | |
  • 1
    +2 for literate. Personally, I think whole, punctuated sentences communicate most effectively. – KeithS Mar 4 '11 at 22:07
10

I prefer punctuation, but I was a literature major and a technical writer before I became a programmer. As long as the message is unambiguous, I don't insist on punctuation.

Incorrect punctuation, typos and bad grammar, on the other hand, I do not tolerate.

| improve this answer | |
  • 1
    ... and BE CONSISTENT! If you use punctuation in one message, use it in every message. – Jeff Knecht Mar 4 '11 at 23:05
  • I'm old enough to be unsure of the meaning of this, but anyway: "W00t"! – PSU Mar 5 '11 at 2:18
0

I agree with the answers already given - as long as the messages are clear and consistent, with or without punctuations, it should really be a matter of taste.

The only hazard, I suppose, with ending the messages with punctuation is that you might forgot that you've already given it previously and add it again as the message progresses. Thus in the end the message may end up with multiple punctuations.

| improve this answer | |
0

Regarding duplicate punctuation, you could use a utility to build up messages, and it could check if there is duplicate punctuation?

If you use a common utility to build your messages (whatever their type: info, error, etc.) then perhaps it could help? Then you have consistency at least. You could enforce a contract that any message that is returned from the utility is a complete sentence, ending in a full-stop. The same utility could be used to concatenate messages - adding a space if there's a message already present. Only thing is the utility could become quite a big thing.

Another thing to worry about is internationalization. You'd want to stay consistent among not only different messages in one language that your software uses, but in all languages.

And if it's possible, a picture is worth a thousand words, and if the same message could be provided in a picture, then I think it may be even more useful than a message. Kinda like road signs.

| improve this answer | |