Answers for "Check if the input only contains letters using JS"

0

Check if the input only contains letters using JS

function allLetter(inputtxt)
  {
   var letters = /^[A-Za-z]+$/;
   if(inputtxt.value.match(letters))
     {
      return true;
     }
   else
     {
     alert("message");
     return false;
     }
  }
Posted by: Guest on September-07-2021

Code answers related to "Check if the input only contains letters using JS"

Code answers related to "Javascript"

Browse Popular Code Answers by Language