How to create a form with an input field that can contain only N letters with no numbers or special characters in HTML

1 Answer

0 votes
<!DOCTYPE html>
<html>
<body>

<form>
  <input type="text" name="firstName" pattern="[A-Za-z]{5}"><br />
  <input type="submit">
</form>

</body>
</html>

 



answered May 1, 2020 by avibootz

Related questions

...