nus-cs2103-AY2425S1 / pe-dev-response

0 stars 0 forks source link

No validation for phone number lengths. #182

Open nus-se-script opened 2 days ago

nus-se-script commented 2 days ago

Given the scope of the application is within NUS, we would expect phone numbers of a certain format within Singapore's context. (ie. 8 digits starting with 8 or 9).

Screenshot 2024-11-15 at 4.41.58 PM.png

Currently, it is possible for input of phone numbers that are only 7 digits long. This could be an issue if the error is only found later on as the user would then need to find out what the missing digit is. Hence, this becomes a rather important bug for the target users of the application.


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

shardhrv commented 1 day ago

Team's Response

There is phone number validation in PlanPal as can be seen in the following screenshot, running add n/shardhrv p/00 e/test@test.com a/West Wing shows these constraints:

image.png

The reason the above constraints were chosen was that minimally phone numbers can range from 3 to the longest one used by a country being 17 (ref: https://worldpopulationreview.com/country-rankings/phone-number-length-by-country). Given NUS's context as a university with much international attention, there could very well be a need to store the contacts of those overseas. Furthermore, the user may also use it to store office numbers or extension numbers which may be of varying length than the standard digits of 8 for Singaporeans.

Duplicate status (if any):

--