[Nigeria Mobile Support]: Fixed parsing of Nigerian mobile numbers #243
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.
References:
[1] Mobile Telephony Number Allocation (Nigerian Communications Commission)
http://www.ncc.gov.ng/index.php?option=com_content&view=article&id=113&Itemid=102
[2] National Numbering Plan (Nigerian Communications Commission)
http://www.ncc.gov.ng/index.php?option=com_docman&task=doc_download&gid=92&Itemid=
[3] Telephone numbers in Nigeria (Wiki)
http://en.wikipedia.org/wiki/Telephone_numbers_in_Nigeria
[4] ITU Nigeria
http://www.itu.int/dms_pub/itu-t/oth/02/02/T020200009C0001PDFE.pdf
According to the aforementioned references, the area codes for GSM numbers are 3 digits long with the subscriber part having 7 digits. This means the previous match rule
match(/^(702\d)\d+$/) >> split(3,4) was incorrect as this would allow an 11-digit national number which is not given by any of the specifications. Also, the ranges
700-709, 800-809, 810-819, and 900-909 have been allocated for mobile numbers as outlined in [1].
Fixed up parsing of mobile numbers according to the [1] and extended both the plausibility specs as well as the country specs