4 ms·
> If you have to restrict the length, use maxlength in the input field. The problem with this approach is that, for longer passwords, the user may not be aware
by gabemart 13y ago
> If you have to restrict the length, use maxlength in the input field.
The problem with this approach is that, for longer passwords, the user may not be aware that the maxlength property has prevented the field accepting the last n characters of their password. They may believe they have successfully submitted their entire password. In other words, they may believe their password is
i_love_peanut_butter_and_j3lly
but it's actually
i_love_peanut_butter_a
This may work for a time, but is likely to cause problems down the road.