JS jQuery Phone number validation allow 10 digits only If you want to validate an input field where user can input only 10 digits and allow only numeric values then use below code Solutions:- 1) jQuery Allow number upto 10 digits jQuery("#pval").on("keypress keyup blur",function (e) { var thisvallen = jQuery(this).val(); jQuery(this).val(jQuery(this).val().replace(/[^0-9\.]/g,'')); if ((e.which != 46 || jQuery(this).val().indexOf('.') != -1) && (event.which < 48 || event.which > 57)) { event.preventDefault(); } if((thisvallen).length > 10) { jQuery(this).val((jQuery(this).val()).substr(0,10)); event.preventDefault(); } }); 2) Validate Phone number using JS...
PHP,WORDPRESS,CAKEPHP,JQUERY,PHP TUTORIALS,CAKEPHP TUTORIALS,JQUERY CODES, CSS CODES, HTML CODES,EXPO, React, React Native, Angular,OOPS ,PHP INTERVIEW QUESTIONS @shubham715