DEV Community

loading...

How To Validate 10 Digit Mobile Number Using Regular Expression

websolutionstuff profile image Websolutionstuff Originally published at websolutionstuff.com ・1 min read

In this small tutorial I will explain you how to validate 10 digit mobile number using regular expression in laravel or PHP.

The Regex validation gives flexibility to user to enter numbers in different format as per user's requirements. When you are working with form validation at that time You need to restrict user to enter invalid value and users allow only numeric value and enter 10 digits number specially for Indian mobile no validation.

So let's start..

You need to copy below code in your view or html file to get output.

Read on Websolutionstuff : How To Validate 10 Digit Mobile Number Using Regular Expression

Discussion (0)

pic
Editor guide