Bummer! This is just a preview. You need to be signed in with an account to view the entire instruction.

Well done!

You have completed (UPI) Chapter 6: Navigating with HTML Links and Structuring Data with Tables!

Instruction

Example: Using Regular Expressions in HTML Forms

Here’s a complete form using various regular expressions to validate user input.

<form>
  <!-- Username must be alphanumeric and 6-12 characters -->
  <label for="username">Username (6-12 characters):</label>
  <input type="text" id="username" name="username" required
         pattern="[a-zA-Z0-9]{6,12}"
         title="Username should be 6-12 characters and only alphanumeric."...