AY2425S1-CS2103T-T16-3 / tp

MIT License
0 stars 5 forks source link

Add Command accepts invalid phone numbers #224

Open chongsun2002 opened 6 days ago

chongsun2002 commented 6 days ago

New person added: John Doe2; Phone: 1123; Email: john@example.com; Address: john street, block 123, #010-11; Tags:

If the target group is assumed to be NGOs in Singapore, then phone numbers could be checked, to help the user ensure they do not accidentally enter an invalid phone number (which they then forget about in future). For SG phone numbers, they should fulfill the criteria based in: Telephone numbers in Singapore

seah-minlong commented 15 hours ago

Considering that the NGO might have international partners and the like, only validating for SG phone numbers might be incorrect? I was also thinking along the lines that since they can edit the number, it will be fine.

Furthermore, since our target audience is just the administrators of the NGO themselves, I assume that means we don't have to account for malicious inputs.

But it is true that they can unknowingly key in the wrong number, and having a validation system of sorts could help. Not too sure about this. Tagging for your inputs too @voldiemort @zzzlou @Justin-Yeo

voldiemort commented 17 minutes ago

I think assuming that NGOs might at some point work with international partners is fair enough.

With a quick search, seems like the minimum phone number length worldwide is 4. Currently the code checks that phone numbers are at least 3 digits long. Should we just change that to 4 digits then?

chongsun2002 commented 2 minutes ago

3 digits for 999 etc. Think if international partners are ok then this should be fine. I'll just change this to an enhancement.