set minimum of 10 digit validation in javascript code example
Example 1: jquery only number allowed to 10 digit
<script type="text/javascript">
$(document).ready(function() {
$("#phone_work").attr("maxlength", "10");
$("#phone_work").keypress(function(e) {
var kk = e.which;
if(kk < 48 || kk > 57)
e.preventDefault();
});
});
</script>
Example 2: contact text box accept only till 10 digit in html
<input type="text" maxlength="10" pattern="\d{10}" title="Please enter exactly 10 digits" />