fix: phone validation now only accepts 8 digit #s starting with 8 or 9 #101
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.
Problem
This PR adds an even strong mobile validation (only for Singapore numbers). SG phone number validation now only accepts 8 digit numbers starting with
8
or9
using a regex match:Closes #100
Solution
Bug Fixes:
Before & After Screenshots
BEFORE:
![Screenshot 2020-08-06 at 6 18 53 PM](https://user-images.githubusercontent.com/22133008/89521002-50364900-d811-11ea-8e84-f75e0d7da7aa.png)
![Screenshot 2020-08-06 at 6 18 48 PM](https://user-images.githubusercontent.com/22133008/89521010-51677600-d811-11ea-86c5-4ada91c54cf7.png)
![Screenshot 2020-08-06 at 6 18 42 PM](https://user-images.githubusercontent.com/22133008/89521012-52000c80-d811-11ea-8b1e-5f828691a567.png)
AFTER:
![Screenshot 2020-08-06 at 6 14 46 PM](https://user-images.githubusercontent.com/22133008/89520917-2e3cc680-d811-11ea-9146-034d794839ef.png)
![Screenshot 2020-08-06 at 6 14 38 PM](https://user-images.githubusercontent.com/22133008/89520920-2f6df380-d811-11ea-8fe3-ee9c88ce22cb.png)
![Screenshot 2020-08-06 at 6 14 29 PM](https://user-images.githubusercontent.com/22133008/89520923-30068a00-d811-11ea-936e-400a1a572d62.png)
![Screenshot 2020-08-06 at 6 27 41 PM](https://user-images.githubusercontent.com/22133008/89521693-8cb67480-d812-11ea-97df-429c16c44836.png)