I want to create a input field for phone number. I am creating input field using JavaScript dynamically.
<input type="text" id="phone" name="phone">
How to restrict users to type only 10 digit numbers in order to get a phone number.
<input type="text" name="country_code" title="Error Message" pattern="[1-9]{1}[0-9]{9}">
This will ensure