PDA

View Full Version : Need passwords to be 9 minimum characters



impload
11-04-2009, 01:15 PM
We have a form and we want the passwords to be 8 character minimum with 1 sysbol/number. How can we enforce this? :)

jscheuer1
11-04-2009, 04:41 PM
I don't know what your level of expertise with javascript is, but if you know how to get the value you could use a regular expression to test it. Now I'm assuming that what you really mean though is at least 9 characters, no spaces, with at least one non-space, non-letter character. What you described in your post seems to require 8 letters followed by one non-space, non-letter character.

So let me know if I have the requirements right or not, and if you at least have the basic knowledge to access the value attribute of the password field for evaluation or not, and I can make something up for you.

Whatever you do though, if this page can be accessed without javascript enabled, you must also check the validity of the password format on the server side.