nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Empty `PHONE_NUMBER` Field in `edit` Command Prompts Unhelpful Exception #3203

Open nus-pe-bot opened 3 days ago

nus-pe-bot commented 3 days ago

Description

The p/ field should not be empty is not alerted to the user.


Steps to Reproduce

  1. Attempt editing a user with the p/ field empty.
  2. Observe that the result display returned does not address the issue.

    Expected Behavior

    Users should be prompted of the strictly non-empty PHONE_NUMBER field when inputting an empty p/.

Actual Behavior

However, the result display only reminds user that the field should be of numerics, starting with certain digits and of strictly 8 digits long.

Additional Information

Input: edit 1 p/ Output: Screenshot 2024-11-15 at 5.07.46 PM.png


Suggested Improvement

Consider throwing another command exception in the case of that field being empty.


[original: nus-cs2103-AY2425S1/pe-interim#1965] [original labels: type.FeatureFlaw severity.Low]

Feng1231 commented 2 days ago

Team's Response

Thank you for your input.

When we designed the help message for input validation, we felt that this help message will be clear enough to the user. This help message Phone numbers should only contain numbers, start with 3, 6, 8, or 9, and be exactly 8 digits long is more specific than telling user that p/ should not be empty Moreover, stating that the phone number should be exactly 8 digits long will already imply that it cannot be blank, as blank means the phone number is 0 digit long.

We thought about a new user that does not know any constraints about this application, and when the user types in edit 1 p/, we feel that between these two options:

  1. be reminded with p/ should not be empty which has no other information about the actual constraints of PHONE_NUMBER, OR
  2. be reminded with our current error message, which tells you exactly how you should enter the PHONE_NUMBER

the user might prefer the 2nd option more, as it tells the user more information.

Of course, your suggestion is valuable to our team in terms of improving the user experience for UGTeach, and we will consider improving this in the future iteration, which is to inform user if the field is empty, on top of providing all the information about PHONE_NUMBER's constraint.

Duplicate status (if any):

--