I’m making a form which older people have to use to register for a health service. (School project)
I want to make it so that if the enter less than or more than the allow number of characters for the alert box to state how many characters they have entered in their last password to show where they went wrong. I have written or rather copied and edited the code to validate.
if (pw.length < o.length[8] || pw.length > o.length[25])
alert("Your password must be between 8 to 25 chacters. The one you entered had * characters")
//Would have to remember how many were entered, and then produce it
return false;
I have done a bit of researching nothing I could find.
However if you even had some pointers on how I would go about I would be grateful.
1 Answer