I need to make sure a person's password meets specific criteria before they can continue creating their account. I would like to add a statement checking for '
, "
, and ,
. The application is in VBScript. This is what I have so far. I cannot find anything on the web.
IsComplex = True
'Check Length
If Len(cPassword) < 8 Then
IsComplex = False
End If
'Check for lowercase letters
HasLowerCase = False
For x = 97 to 122
If Instr(4,cPassword,chr(x)) > 0 Then
HasLowerCase = True
End If
Next
If HasLowerCase = False Then
IsComplex = False
cForceChange = "E"
End If
'Check for uppercase letters
HasUpperCase = False
For x = 65 to 90
If Instr(1,cPassword,chr(x)) > 0 Then
HasUpperCase = True
End If
Next
If HasUpperCase = False Then
IsComplex = False
cForceChange = "E"
End If
'Check for numbers
HasNumber = False
For x = 48 to 57
If Instr(1,cPassword,chr(x)) > 0 Then
HasNumber = True
cForceChange = "E"
End If
Next
If HasNumber = False Then
IsComplex = False
cForceChange = "E"
End If