SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)

    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:
    Code:
    DoubleDee; Stomme poes; Force Flow; BigBob; LilOne; Ralph; ILoveWeDesignSoMuch

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

    Option#1:
    Code:
    'BibBob' is too short and must be between 8-15 characters in length.
    'LilOne' is too short and must be between 8-15 characters in length.
    'Ralph' is too short and must be between 8-15 characters in length.
    'ILoveWeDesignSoMuch' is too long and must be between 8-15 characters in length.

    Option#2:
    Code:
    '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.

    Option#3:
    Code:
    Usernames must be between 8-15 characters in length.

    Option#4:
    Code:
    << 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?!

    Sincerely,


    Debbie

  2. #2
    SitePoint Mentor silver trophybronze trophy
    Mikl's Avatar
    Join Date
    Dec 2011
    Location
    Edinburgh, Scotland
    Posts
    1,561
    Mentioned
    63 Post(s)
    Tagged
    0 Thread(s)
    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:

    Code:
    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.

    Mike

  3. #3
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by DoubleDee View Post
    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:
    Code:
    DoubleDee; Stomme poes; Force Flow; BigBob; LilOne; Ralph; ILoveWeDesignSoMuch

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

    Option#1:
    Code:
    'BibBob' is too short and must be between 8-15 characters in length.
    'LilOne' is too short and must be between 8-15 characters in length.
    'Ralph' is too short and must be between 8-15 characters in length.
    'ILoveWeDesignSoMuch' is too long and must be between 8-15 characters in length.
    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.

  4. #4
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mikl View Post
    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.
    I am talking abou the Recipients that a Sender types in...


    Quote Originally Posted by Mikl View Post
    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.

    Mike
    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?

    Sincerely,


    Debbie

  5. #5
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stevie D View Post
    That's completely the wrong error message.
    And WHY is that???


    Quote Originally Posted by Stevie D View Post
    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?
    A different error message, like...
    Code:
    'randomname' not found.

    Quote Originally Posted by Stevie D View Post
    That's the same error you should give here, just tell the sender that the recipient is unknown.
    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!!

    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!"


    Quote Originally Posted by Stevie D View Post
    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 *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!!!)

    Sincerely,


    Debbie

  6. #6
    Mouse catcher silver trophy Stevie D's Avatar
    Join Date
    Mar 2006
    Location
    Yorkshire, UK
    Posts
    5,888
    Mentioned
    122 Post(s)
    Tagged
    1 Thread(s)
    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.

  7. #7
    SitePoint Mentor silver trophybronze trophy
    Mikl's Avatar
    Join Date
    Dec 2011
    Location
    Edinburgh, Scotland
    Posts
    1,561
    Mentioned
    63 Post(s)
    Tagged
    0 Thread(s)
    Debbie,

    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).

    Mike

  8. #8
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mikl View Post
    Debbie,

    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.
    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!


    Debbie

  9. #9
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Stevie D View Post
    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.
    Ha!! Just what I need... More scope creep!!

    Good idea, but this is one time I'll say, "Save it for v3.0!!"

    Thanks,


    Debbie

  10. #10
    SitePoint Mentor silver trophybronze trophy
    Mikl's Avatar
    Join Date
    Dec 2011
    Location
    Edinburgh, Scotland
    Posts
    1,561
    Mentioned
    63 Post(s)
    Tagged
    0 Thread(s)
    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.

    Mike

  11. #11
    SitePoint Wizard DoubleDee's Avatar
    Join Date
    Aug 2010
    Location
    Arizona
    Posts
    3,777
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mikl View Post
    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.
    Yep, that is how I have it now ---> You can't go to "B" unless "A" is in order.


    Quote Originally Posted by Mikl View Post
    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.

    Mike
    Thanks!


    Debbie


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •