ok so i have to make a simple program that when a user enters a password, the verify button will run and will check to make sure that the password meets 2 criterias. 1. 6 characters or more 2. must contain atleast 1 letter and number.
If Isvalid(CStr(True)) Then
MessageBox.Show("That is Valid", "VALID")
Else
MessageBox.Show("That is invalid", "INVALID")
txtPassword.Focus()
txtPassword.SelectAll()
'declare boolean variable
Dim blnStatus As Boolean
'function to test that the password entered meets criteria
If Not txtPassword.Text.Length < 6 And Not IsNumeric(txtPassword.Text) Then
blnStatus = True
Else
blnStatus = False
End If
Return blnStatus
End Function
I can make sure the the length is no less than 6 and that it cannot hold only numerical values , but how do i prevent a user from entering only letters as a password. Thanks