Error-Messages for Multiple Entries

I am adding new functionality to my website to allow a User to send a PM to multiple people at once.

One big “gotcha” that I am discovering is that this adds an enormous amount of complexity to my Error-Handling and UI.

When a User was only allowed to send a Message to one person, all I had to do was check one value, and if there was an issue, display a simple message.

But now that some fields could have multiple values, I’m not exactly sure what to do, and this comes down to…

“How much hand-holding should my Error Messages provide for multiple entries?”

Here is an example…

Let’s say that Usernames must be between 8-15 characters in length, and the Sender types in the following…

Send To:

DoubleDee; Stomme poes; Force Flow; BigBob; LilOne; Ralph; ILoveWeDesignSoMuch

For the Error-Message for that particular Form Field, how explicit must things be??


'BibBob' is [b]too short[/b] and must be between 8-15 characters in length.
'LilOne' is [b]too short[/b] and must be between 8-15 characters in length.
'Ralph' is [b]too short[/b] and must be between 8-15 characters in length.
'ILoveWeDesignSoMuch' is [b]too long[/b] and must be between 8-15 characters in length.


'BibBob' must be between 8-15 characters in length.
'LilOne' must be between 8-15 characters in length.
'Ralph' must be between 8-15 characters in length.
'ILoveWeDesignSoMuch' must be between 8-15 characters in length.


Usernames must be between 8-15 characters in length.


<< Some other Error-Message>>

I am usually all for making things explicit and easy to understand - especially for Error-Handling.

At the same time, you have to draw the line somewhere, and it seems reasonable to assume your End-Users are semi-intelligent and can figure things out with some basic clues versus having to write a novel explaining where they messed up?!

What do you think?! :-/



Hi Debbie,

It seems to me that you are doing this check in the wrong place.

If user names must be 8 - 15 characters, then surely the place to check for that is the point at which a new user choses his or her name. It would then be impossible for a user to have a name that is too short or too long, and so there is no need to check the length at the time the PM sent.

Of course, you do need to check that the PM recipients are existing user names. But, in that case, the error message is much simpler:

Unknown user name(s): BigBob LilOne Ralph ILoveWeDesignSoMuch

Also, if some but not all of the recipients are rejected, the message should state whether or not the whole message failed or whether it was correctly sent to the valid recipients.


That’s completely the wrong error message. What error message would you give if I entered ‘randomname’ that was a legal user ID but was not the name of any member of your site? That’s the same error you should give here, just tell the sender that the recipient is unknown. You may then want to have a supplementary ‘help’ box that says what the restrictions on usernames are, but even that I would say is going over the top.

I am talking abou the Recipients that a Sender types in…

And that is what this thread is about.

I need more complex error messages when it comes to describing the outcome of several Recipients entered in by a Sender in the “Send PM” form…

What about the options I mentioned in my OP?



And WHY is that???

A different error message, like…

'randomname' not found.

Why make it a guessing game?!

These are Registered Members trying to send a PM to other Registered Members.

This should not be a death trap!! :rolleyes:

Users make mistakes.

Maybe you are trying to PM me, and you accidental type in “Debbie” instead of “DoubleDee”.

Why not help the Sender figure out what they did wrong?!

Maybe my username is “DoubleDee9” - because a username must be 10 characters - and you forget the 9 and type in “DoubleDee”.

It’s hardly practical to echo…

“Nope. Try again!” :wink:

I totally disagree with your philosophy and Error-Messages…

This is not a battle between Good and Evil. It is helping your users out when they mess up. (And we are NOT talking about a Login screen to your bank!!!)



As I said, the important thing for someone sending a PM is “is this an ACTIVE username”, not “Is this a LEGAL username”. Someone who wants to send you a message but types in ‘SingleDee’ needs just the same help as someone who types in ‘Debbie’, the main thing is that it’s nit a username in use, the reasons behind that are secondary.

Maybe you should offer a search so that people can find the right username if they have forgotten it. Or if you want to challenge yourself, get the system to return a list of the most likely suggestions when someone types in one that is wrong.


I think you misunderstand the point that both Stevie and I are making.

A registered member is trying to send a PM to another registered member. The sender incorrectly types the recipient’s name as “Debbie” instead of “DoubleDee”. As far as the sender is concerned, this is an incorrect recipient’s name. The fact that the incorrect name is shorter than eight characters is irrelevant. What he needs to know is that there is no such member as “Debbie”.

The obvious error message in that case should be “No such member”. It’s as simple as that.

And I can see no harm in giving the sender a little extra help, by suggesting members with similar names, or even by giving an incremental search feature (which is what Sitepoint does).


Okay Mike and Stevie, I’m backing off my earlier comments.

Since this isn’t a Registration Form - where the clues would make sense - it is indeed extraneous to be listing valid characters.

(My code still runs the Usernames through a Regex to make sure someone isn’t trying to do any hacking, but that should be hidden from the end-user.)

Thanks for the advice!


Ha!! Just what I need… More scope creep!! :stuck_out_tongue:

Good idea, but this is one time I’ll say, “Save it for v3.0!!”



One other point occurs to me, Debbie.

There might be an argument for doing the 8 - 15 character check before you check that the recipient exists. In other words, when the sender types the name, check its length. If it is less than 8 or more than 15, reject the recipient straight away, without searching the database. After all, if the name is invalid, it follows that it won’t be present in the database.

The argument in favour of this is that it will save you the cost of a database access. But neverthelss, the error message should still indicate that it’s an unknown recipient, not an invalid user name.

Just a thought.


Yep, that is how I have it now —> You can’t go to “B” unless “A” is in order.