DEV Community

Abdulfatai Suleiman
Abdulfatai Suleiman

Posted on

1

Validate a Nigerian Phone Number in Laravel

There are times when you just want to make an input field accept values in the phone number format. In this article, I show just how to go about it in laravel. Any string taken in is checked to see if it has ‘+234’ as the first three numbers and if the remaining numbers are just 10 in length.
So, here it goes.

Alt Text

Thanks for staying with me until this point.
Please I would love to receive your questions and reviews on this.

Top comments (0)

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay