forked from nus-cs2103-AY2425S1/tp
-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update phone parsing #172
Merged
Rachael-Chan
merged 9 commits into
AY2425S1-CS2103-F10-2:master
from
Andrew22Teoh:branch-RestrictPhoneAllowance
Nov 1, 2024
Merged
Update phone parsing #172
Rachael-Chan
merged 9 commits into
AY2425S1-CS2103-F10-2:master
from
Andrew22Teoh:branch-RestrictPhoneAllowance
Nov 1, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Andrew22Teoh
added
type.Enhancement
An enhancement to an existing story
priority.Medium
Nice to have
severity.Medium
A flaw that causes occasional inconvenience to some users, but they can continue to use the product.
alpha-bug
labels
Nov 1, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
|
Rachael-Chan
approved these changes
Nov 1, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
alpha-bug
priority.Medium
Nice to have
severity.Medium
A flaw that causes occasional inconvenience to some users, but they can continue to use the product.
type.Enhancement
An enhancement to an existing story
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR does two things simultaneously.
First, it allows phone numbers to have whitespace in the middle between 2 groups of 4 numbers.
This is in line with how we had originally envisioned the way that phone numbers should be parsed, and it also makes sense from a human readability point of view. However, spaces in unexpected places will not be allowed.
Thus,
9112 3942
,91123942
, and even9112 3942
are allowed, but911 23942
will not be allowed.Closes #149
Secondly, it requires the first digit of the phone number to be a 6, 8, or 9. This is because we have scoped SocialBook to be for social workers in Singapore, and so any "phone number" entered by users that does not begin with those numbers must be a typo, so we want the error to notify them of it.
Closes #168
Tests have been updated accordingly, as has the user guide. For further clarification on the multiple fields we are adding, I have also created a new section in the user guide Contact field requirements, where we can specify the detailed requirements on any contact fields that aren't obvious. This might be related to the intention of #153, but I'm not sure if this is what the suggestion meant, so do let me know if this would be fine.