Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

input validation for phone number

 <input oninput="this.value = this.value.replace(/[^0-9.]/g, '').replace(/(..*)./g, '$1');" class="form-control" id="phone" name="phone" type="text" placeholder="Phone"/>
 
PREVIOUS NEXT
Tagged: #input #validation #phone #number
ADD COMMENT
Topic
Name
9+5 =