-1

I am working in laravel v4.2 project and I have an array of contact numbers like below:

$numbers = array(+156258544,+9661234667,+96592514525,...);

Now I want to validate this array of numbers that which contact number is valid or not valid.

Is there any free or paid API like twillio who validate array of numbers instead of single contact number.

OR any other method that is useful for this issue?

Thank you

Zac
  • 1,305
  • 3
  • 17
  • 28
Rizwan Saleem
  • 904
  • 11
  • 28
  • I think you can refer to [this answer](https://stackoverflow.com/a/123681/6384636) which shows a method used for validation. This is a simple method you can use to validate phone numbers. – Zac Oct 30 '17 at 07:27

2 Answers2

1

Loop it through foreach and use Laravel Phone library to validate those.

This allows to

  1. Validate Number
  2. Format Number
Abdulla Nilam
  • 36,589
  • 17
  • 64
  • 85
0

In first step, you have to check if this phone number format is really correct. Then, you can check this link for phone numbers validation.

Gothiquo
  • 841
  • 1
  • 8
  • 31