Some VBScript code along these lines...
<%
Dim varPassword, varCharacter ' Strings
Dim varContainsANumber ' Boolean
Dim i ' Integer
varPassword = Request.Form("password")
varContainsANumber = False
If varPassword <> "" And Not IsNull(varPassword) Then
' Password was entered - check length
If Len(varPassword) >= 6 Then
' Password is 6 characters or longer
' Check that at least one number is present
' Loop through string and test each character to see if it
is
numeric
i = 0
While i < Len(varPassword)
varCharacter = mid(varPassword, i, 1)
If IsNumeric(varCharacter) Then
' Number found, set flag to true
varContainsANumber = True
End If
i = i + 1
Wend
If varContainsANumber Then
' Password has passed criteria checks... do stuff...
Else
' Password failed criteria checks
' Return an appropriate error message to the user
End If
Else
' Password is shorter than 6 characters
' Return an appropriate error message to the user
End If
Else
' Password was not entered
' Slap user with a large fish
End If
%>
Something like that - off the top of my head - untested!! :)
HTH
Cheers,
Rob
http://robgt.com/ [Tutorials and
Extensions]
Firebox stuff:
http://robgt.com/firebox
Skype stuff:
http://robgt.com/skype
SatNav stuff:
http://robgt.com/satnav