Q:

Display multiple field errors on a Visualforce page

I have a Visualforce page that when there is more than one field error it only displays the first error in the apex:pageMessages section.
The Salesforce documentaion says all the pageMessages should display all the error messages.
How can I get all the errors to display?
Validation logic.
if (c.Subject == null) {
    valid = false;
    c.Subject.addError('You must enter a value');
}
if (c.ContactId == null) {
    valid = false;
    c.ContactId.addError('You must enter a value');
}
if (c.Priority == null) {
    valid = false;
    c.Priority.addError('You must enter a value');
}
if (c.Description == null || c.Description == '') {
    valid = false;
    c.Description.addError('You must enter a value');
}
if (!valid) {
    return null;
}

A:

The error messages must be unique.
Salesforce treats error messages that are exactly the same as the same message and only displays it once.
I changed the error messages from "You must enter a value" to "You must enter a subject" "You must enter a description" etc. and it works correctly.

