devshuvo

3 letter and 5 number html pattern

Sep 23rd, 2020
769
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4.  
  5. <h1>The input pattern attribute</h1>
  6.  
  7. <p>A form with a password field that must contain 8 or more characters:</p>
  8.  
  9. <form action="/action_page.php">
  10.   <label for="pwd">Password:</label>
  11.   <input type="password" id="pwd" name="pwd" pattern="[a-zA-Z]+[0-9]{3,5}" title="Eight or more characters">
  12.   <input type="submit">
  13. </form>
  14.  
  15. </body>
  16. </html>
  17.  
RAW Paste Data