Skip to content
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

Valid phone number from Libya #1290

Closed
almelyan-ly opened this issue May 2, 2020 · 2 comments
Closed

Valid phone number from Libya #1290

almelyan-ly opened this issue May 2, 2020 · 2 comments

Comments

@almelyan-ly
Copy link
Contributor

Hello everyone, we need add 'ar-LY' locale in isMobilePhone.js lib to do validation for Libya internal phones and mobile phones
country code : +218
format internal phones : ( [+]?[218]|[0] )? [AA[A]?] [XXX-XXX[X]?]
[A] area codes : range 2 or 3 digits
[X] phone number : 6 or 7 digits
format mobile phones : ( [+]?[218]|[0] )? [9][1-5] [XXX-XXXX]
company codes : range 91 to 95
[X] phone number : always 7 digits
I've made an initial expression as :
/^((\+?218)|0)?(9[1-6]|\d{2,3})\d{6,7}$/
Please improve the expression and add it into lib
for more info about Libya phone codes see : areaphonecodes
Best regards

@profnandaa
Copy link
Member

@almelyan-ly -- already looks good, can you create a PR for this? See previously done from the commit list...

@almelyan-ly
Copy link
Contributor Author

PR has been created on #1294

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants