String.prototype.trim = function () {
    return this.replace(/^\s*/, "").replace(/\s*$/, "");
}

function validPhoneNumber(inputString){
  
  //check and see if the input string is a valid phone number
  //the input can be in any format but must contain at least 10 digits
  var stripresult = inputString.replace(/[\D]/g, '');
	if(!isNaN(parseInt(stripresult)) && (stripresult.length >= 10)){
	  
	  return true;
	} else {
	  
	  return false;
	}
}