mobile no validation in jquery Example

mobile no validation in jquery: – how to restrict user to type 10 digit numbers in input element using jQuery Code, 10 digit mobile number validation in jquery using regular expression.

mobile no validation in jquery

I validate a phone number or mobile number of 10 digits with no comma, no spaces, no punctuation and there will be no + sign in front the number. user can only enter 10 numbers in textbox using jquery for phone number or mobile validation.

Read Also:  How To Convert XML To Associative Array in PHP

How To Validate 10 Digit Mobile Number Using Regular Expression?

index.html

<html>
<head>
    <title>Allow only 10 digit mobile no using regular expression - www.pakainfo.com</title>
    <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<form>
    <h2>Allow only 10 digit mobile no using regular expression - www.pakainfo.com</h2>
   <div class="col-md-6">
    <label>Mobile Number: </label>
    <input class="form-control" type="text" name="mobile Number" placeholder="Mobile Number" minlength="10" maxlength="10" required>
    <br>
    <label>Mobile Number: </label>
  	<input type="text" class="form-control" name="mobile Number" placeholder="Mobile Number" pattern="[1-9]{1}[0-9]{9}"  required ><br>
    <button type="submit" class="btn btn-success">Submit</button>
  </div>
</form>
</body>
</html>

Don’t Miss : How To Allow Only 10 Digit Mobile Number Validation Using Javascript With Jquery?

I hope you get an idea about mobile no validation in jquery.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.