运行 ❯
获取您
自己的
网站
×
更改方向
保存代码
更改主题,深色/浅色
前往 Spaces
<!DOCTYPE html> <html> <body> <h1>The input pattern attribute</h1> <p>A form with a password field that must contain 8 or more characters that are of at least one number, and one uppercase and lowercase letter:</p> <form action="/action_page.php"> <label for="pwd">Password:</label> <input type="password" id="pwd" name="pwd" pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" title="Must contain at least one number and one uppercase and lowercase letter, and at least 8 or more characters"> <input type="submit"> </form> </body> </html>