Answers for "validar solo letras js"

0

validar solo letras js

$("input.nombre").bind('keypress', function(event) {
  var regex = new RegExp("^[a-zA-Z ]+$");
  var key = String.fromCharCode(!event.charCode ? event.which : event.charCode);
  if (!regex.test(key)) {
    event.preventDefault();
    return false;
  }
});
Posted by: Guest on April-30-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language