5

When building an application should all validation messages have punctuation?

4 Answers4

22

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

John
  • 1,037
  • 1
    +2 for literate. Personally, I think whole, punctuated sentences communicate most effectively. – KeithS Mar 04 '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.

PSU
  • 1,099
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.

gablin
  • 17,407
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.