0

I'm trying to validate an phone number using regex. Basically, i don't know more about regex :) I want to validate it with country code and only numeric value Like: +1-1234567891

I'm using below code to make validation:

'phone_no' => 'required|regex:/^([0-9\s\-\+\(\)]*)$/',

But it's not working for country code, but it's work for only numeric value.

Can anyone have an idea how to make this validation without creating custom validation?

Many thanks!!

Hiren Gohel
  • 4,942
  • 6
  • 29
  • 48

0 Answers0