説明で述べたように、ユーザー入力を検証して、6文字以上で、アルファベットから1文字と1文字。入力の検証に問題があります。少なくとも1つの数字の文字と1つのアルファの文字があることを確認する必要があります
これまでのところ、長さの検証は機能していますが、数値検証が正しく機能するようには見えません。数字だけを入力すると動作しますが、IE abc123に文字を入力すると数字があることが認識されません。
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If txtPassword.TextLength < 6 Then
lblError.Text = "Sorry that password is too short."
ElseIf txtPassword.TextLength >= 6 Then
Dim intCheck As Integer = 0
Integer.TryParse(txtPassword.Text, intCheck)
If Integer.TryParse(txtPassword.Text, intCheck) Then
lblError.Text = "Password set!"
Else
lblError.Text = "Password contains no numeric characters"
End If
End If
End Sub
End Class
これを使用するhttp://stackoverflow.com/a/14850765/1890983 –