HTML5 with regular expressions

/ Published in: HTML
Save to your folder(s)

Copy this code and paste it in your HTML
  1. <form action="" method="post">
  2. <label for="username">Create a Username: </label>
  3. <input type="text"
  4. name="username"
  5. id="username"
  6. placeholder="4 <> 10"
  7. pattern="[A-Za-z]{4,10}"
  8. autofocus
  9. required>
  10. <button type="submit">Go </button>
  11. </form>

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.