input pattern Attribute - <input> element with type="password" that must contain 8 or more characters that are of at least one number, and one uppercase and lowercase letter: - HTML CSS HTML Tag

HTML CSS examples for HTML Tag:input

Description

input pattern Attribute - <input> element with type="password" that must contain 8 or more characters that are of at least one number, and one uppercase and lowercase letter:

Demo Code

ResultView the demo in separate window

<!DOCTYPE html>
<html>
<body>

<form action="/action_page.php">
Password: <input type="password" name="pw" 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><!--from   ww w. java  2s .c om-->

</body>
</html>

Related Tutorials