Password validation 2 Alpha and at least 2 Numeric

I am new to javascript and need to check if a password field has at least 2 alpha and 2 numeric

Here is my script to check for at least one of each but how do I change it to check for at least 2

     alert("Password has to have at least one number and one letter character.");
     return false;
return true;

Who is Participating?
Sjef BosmanConnect With a Mentor Groupware ConsultantCommented:
I think you 're better off with two separate matches, something like these regexp's:


Anyway, if this doesn't help, ask Community Support to move your question form this Notes TA to the JavaScript Topic Area.
You need to use a bracket notation that includes all the possible characters [0-9A-Za-z]
BTW, why are you asking this in a Lotus Notes forum?
guestslAuthor Commented:
I asking in the Notes Forum because the javascript is on in a Domino Database on a form used to allow users to reset thier password.

I will also ask in the Javascript forum

thanks for your advice so far
guestslAuthor Commented:
Thanks for your advice a have manged to get the javascript to work all ok thanks for pointing me in the direction of the Javascript forum that helped a lot
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.