Password input
Password input provide a way for the user to securely enter a password. The element is presented as a one-line plain text editor control in which the text is obscured so that it cannot be read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("•").
When to use
- Password input boxes generally work just like other textual input boxes; the main difference is the obscuring of the content to prevent people near the user from reading the password.
When not to use
- If the value consist of numbers, but this numbers are not incremental (e.g. telephone or credit cards numbers).
Usage guidelines
Specifications
It is recommended the use of a pattern for password inputs, in order to help ensure that valid passwords using a wide assortment of character classes are selected and used by your users.
The password must be an integer value of 0 or higher.
You can set a
min
andmax
value the field can have.The input will fail constraint validation if the length of the text entered into the field is fewer than minlength UTF-16 code units long.
The increment by default is one, but you can set the
step
attribute to constrain valid values to a certain set of steps (e.g., multiples of 10).
For detailed information about Password input, read <input type="password"/>