I'm trying to set a minimum password lenght for a login page; however, it seems that the only attribute the password (input) tag has is maxlength. I know you can use the new pattern or min attribute, but I need something that works in IE 9. Is there a simple/replacement way to solve this or will I have to use strlen?
Some Ok answers so far.
However, this is much more a concern server-side than client. I would not be difficult to "hack" the markup or Javascript to allow a short password.
You should always check server-side as well to make sure nothing weird is going on.
To sum it all up: Use Javascript to make sure the password is longer than the minimum length and recheck it server-side to make sure the jsfunction was not bypassed in any way.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With