nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

Ability to input any and all special characters in the phone number field #1069

Open nus-se-script opened 2 weeks ago

nus-se-script commented 2 weeks ago

The user should not be able to add any and all special characters in the phone number:

Screenshot 2024-11-15 at 4.51.56 PM.png

I think a plus sign and brackets are the only special characters that make logical sense in a phone number. Phone number validation in applications today will most definitely flag out such erroneous inputs. Furthermore, I don't agree with allowing such a high extent of flexibility to the user as described in your UG:

Screenshot 2024-11-15 at 4.49.09 PM.png


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

lithops-zty commented 2 weeks ago

Team's Response

Thanks for the report. However, this suggestion violates the 'no overzealous input validation' principle set out by the textbook, reproduced here:

Overzealous input validation: This is a common problem in UIs designed by programmers, because programmers tend to define 'valid' in strict data type point of view, whereas it should be defined based on the user's point of view.

Also, the textbook gave a good example why special characters should be allowed:

Example 1: While your software allows only one phone number in input values, a user might want to input 1234 5678 (HP) 1111-3333 (Office) -- blocking that input might not add any value but allowing it does.

Since we allow extra notes to be stored inside the phone field, we should therefore allow special characters which may be used inside the notes.

Duplicate status (if any):

--