Ten digit mobile number validation using jQuery

Mobile number validation using jQuery

var mob = /^[1-9]{1}[0-9]{9}$/;
$('#btnSubmit').click(function () {
    if (mob.test($.trim($('#mobileNo').val())) == false) {
        alert("Please enter valid mobile number.");
        $('#mobileNo').focus();
        return false;
    } else {
        alert("Valid mobile number.");
    }
});
Ten digit mobile number validation using jQuery Ten digit mobile number validation using jQuery Reviewed by Bhaumik Patel on 9:03 PM Rating: 5