Howdy all,
Attempting to evaluate a user password as they are setting up their accounts for the first time to ensure it meets the following criteria:
at least 2 uppder case letters
at least 2 special characters
at least 2 numbers
must be atleast 8 characters but no more than 15.
I have my user entry form setup with red round shapes that i cam changing the colors to green as the user is entering in their desired password. As it meets the syntax criteria in the text box i would like for those colors to change from red to green. The code is being placed in the interactive change section . But unfortnately it is not happening. The code is below. Hopefully someone smarter than I can assist figuring it out. I considered putting the code in a For Endfor loop within the Interactive change event of the text box.
m.lcChar = Substr(this.value,1)
Do Case
Case m.lcChar $ "!@#$%^&*_-+=':;.,"
oVar.punctuation = oVar.punctuation + 1
IF oVar.punctuation => 2
ThisForm.Pw1_Shape_2spec.BackColor = RGB(0,255,0)
ELSE
ThisForm.Pw1_Shape_2spec.BackColor = RGB(163,5,29)
ENDIF
Case Isalpha(m.lcChar)
If Isupper(m.lcChar)
oVAr.upCase = oVAr.upCase + 1
IF oVar.UpCase >= 2
ThisForm.Pw1_Shape_2cap.BackColor = RGB(0,255,0)
ELSE
ThisForm.Pw1_Shape_2cap.BackColor = RGB(163,5,29)
endif
Else
oVar.LowCase = oVar.LowCase + 1
Endif
Case Isdigit(m.lcChar)
oVar.digit = oVar.digit + 1
IF Ovar.Digit >= 2
ThisForm.Pw1_Shape_2numb.BackColor = RGB(0,255,0)
ELSE
ThisForm.Pw1_Shape_2numb.BackColor = RGB(163,5,29)
ENDIF
CASE m.lcChar >= 8
IF m.lcChar >= 8
ThisForm.Pw1_Shape_8.BackColor = RGB(0,255,0)
ELSE
ThisForm.Pw1_Shape_8.BackColor = RGB(163,5,29)
endif
Endcase
Thanks in Advance.
J. Turner