Form Validation Message
HTML
Hard
2 views
Problem Description
Create an input that is required and uses minlength 8 for password.
Output Format
Print the HTML code.
Constraints
Use minlength and required.
Official Solution
<!doctype html>
<html lang='en'>
<head>
<meta charset='utf-8'>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<title>meetcode</title>
</head>
<body>
<form action='#' method='post'>
<label>Password
<input type='password' name='password' autocomplete='current-password' required minlength='8'>
</label>
<button type='submit'>Set password</button>
</form>
</body>
</html>
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!