My password length check isn't effective

In this exercice, we are asked to add “minlength” and “maxlength” attributes for both username and password inputs. While the restriction of 3-15 characters for the username field seems to work, the 8-15 length limit isn’t effective on my side. Does anybody have the same problem ? Why ?

Can you share your code?

(There is a “Copy to Clipboard” button at the bottom of the exercise. To preserve code formatting when posting in forums, see the thread: [How to] Format code in posts)

Seems to be working for me.

In my screenshot, the username has a valid length, but the password is too short. Hence, the warning message.
If both the username and password didn’t have a valid length, then the warning message would only highlight the username field. Once you fix the username, then it would display the warning message for password.

1 Like