1<input type="text" name="Phone Number" pattern="[7-9]{1}[0-9]{9}"
2 title="Phone number with 7-9 and remaing 9 digit with 0-9">
1//Author: Mohammad Arman Khan
2<!-- HTML INPUT FIELD -->
3<input name="phone" type="text" class="form-control mb-2 inptFielsd" id="phone"
4placeholder="Phone Number" />
5<!-- JAVASCRIPT CODE REQUIRED -->
6<script>
7 var input = document.querySelector("#phone");
8 window.intlTelInput(input, {
9 separateDialCode: true,
10 customPlaceholder: function (
11 selectedCountryPlaceholder,
12 selectedCountryData
13 ) {
14 return "e.g. " + selectedCountryPlaceholder;
15 },
16 });
17</script>
18<!-- REQUIRED CDN -->
19 <script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/intlTelInput.min.js"
20 integrity="sha512-DNeDhsl+FWnx5B1EQzsayHMyP6Xl/Mg+vcnFPXGNjUZrW28hQaa1+A4qL9M+AiOMmkAhKAWYHh1a+t6qxthzUw=="
21 crossorigin="anonymous"></script>
22 <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/css/intlTelInput.min.css"
23 integrity="sha512-yye/u0ehQsrVrfSd6biT17t39Rg9kNc+vENcCXZuMz2a+LWFGvXUnYuWUW6pbfYj1jcBb/C39UZw2ciQvwDDvg=="
24 crossorigin="anonymous" />
25 <script src="https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/17.0.8/js/utils.js"
26 integrity="sha512-BNZ1x39RMH+UYylOW419beaGO0wqdSkO7pi1rYDYco9OL3uvXaC/GTqA5O4CVK2j4K9ZkoDNSSHVkEQKkgwdiw=="
27 crossorigin="anonymous"></script>