Comments (8)
Example using https://www.npmjs.com/package/google-libphonenumber
> const phoneUtil = require('google-libphonenumber').PhoneNumberUtil.getInstance();
undefined
> phoneUtil.isValidNumberForRegion(phoneUtil.parse('+97148376525', 'AE'), 'AE')
true
from phone.
from the data: https://github.com/AfterShip/phone/blob/master/src/data/country_phone_data.ts#L96C3-L97
the input phone number has to be 9-digit
please include sources that describing precisely about the correct phone number length for UAE phone numbers
from phone.
Data in the link provided must be wrong. The phone number I posted in my initial message is a callable, correct Dubai phone. Go ahead and try it.
from phone.
The URL above is indeed the source data of this repo.
And also, please provide any proof / website / pdf showing the phone number format guidelines.
It's unable to know the accurate format of the phone number you provide.
And it is not practical to actually try every phone number in the world.
from phone.
https://github.com/google/libphonenumber/blob/master/resources/metadata/971/comments.csv
https://www.itu.int/oth/T02020000DC/en
https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000DC0001PDFE.pdf
Clearly phone numbers can be 8 digit. The source you are using is outdated.
from phone.
Furthermore, looking at 800 (NDC)
, numbers can be between 5 and 12 digits long
from phone.
The source you are using is outdated.
The source code (https://github.com/AfterShip/phone/blob/master/src/data/country_phone_data.ts#L96C3-L97) would not be proactively updated, by nature eventually it should be outdated, it is the source code, not the "data source" we use 🙂
I will only add "8" to the library at the moment
from phone.
Further digging out from the wiki page
https://en.wikipedia.org/wiki/Telephone_numbers_in_the_United_Arab_Emirates
Landline
0x xxx xxxx (8-digits excluding thunk code 0
)
Mobile
05x xxx xxxx (9-digits excluding thunk code 0
)
This also align with the data source you provided: https://www.itu.int/dms_pub/itu-t/oth/02/02/T02020000DC0001PDFE.pdf
The phone
library only supports mobile phone numbers, not landlines,
we would not include those formats in the library.
(Refer to readme: https://github.com/AfterShip/phone#help)
from phone.
Related Issues (20)
- Chinese cell phone numbers will be recognized as US cell phone numbers HOT 4
- Issue with Bahrain country code HOT 3
- Does Not Validate A Valid Phone Number HOT 1
- Missing Angullia 2642, 2644 area code
- Library does not recognise Swaziland Country Code +268 HOT 8
- Error in validating indian phone number with 11 digits HOT 2
- [Phone number format] Add more Poland prefix phone number HOT 5
- Phone Number Output HOT 1
- Some valid phone number is getting as invalid phone numbers HOT 3
- [Phone number format] HOT 1
- Can not validate India phone number HOT 2
- [feature] provide formatted number HOT 1
- [Phone number format]
- Publish only distribution files
- [Phone number format] US 728 phone code HOT 3
- [Phone number format] HOT 1
- Oman country code is not supported HOT 1
- Invalid parsed numbers have undefined for phoneNumber HOT 1
- [Phone number format] US 329 and 472 phone code HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phone.