I'm trying to only allow password entries that have at least one
numeric character, and 7 to 15 characters long. The below script is
not filtering it properly, it keeps saying all the entries are bad
when i am entering mixed passwords:
<%'' ASP validation for password criteria
dim strpassword
strpassword = request.form("password")
Function CheckString(strpassword, strRegExp)
Dim re
Set re = new RegExp
re.Pattern = strRegExp
CheckString = re.Test(strpassword)
End Function
'Make sure it's in the format of at least one numeral, 7 to 15
characters
If CheckString(strpassword, "^(?=.*\d).{7,15}$") then
response.write "good"
Else
response.write "bad"
End If
%>
???
netsports