Hi All
can anyone point me in the direction of how i can ensure my users useNumbers, chars and *./ etc in their password please
eg Password1.
thanks
gibbo
Visual Basic Express Edition
Hi All
can anyone point me in the direction of how i can ensure my users useNumbers, chars and *./ etc in their password please
eg Password1.
thanks
gibbo
If Password.IndexOfAny(new Char() {"*"c,"\"c,"."c}) > -1 Then 'Password is ok
Hi gibbo....
Your best bet is to use regular expressions... you can get some regular expression that validate strong passwords here
http://regexlib.com/Search.aspx k=password
Here's an example of how to use....
Private Sub TextBox1_Validating(ByVal sender As System.Object, _
ByVal e As System.ComponentModel.CancelEventArgs) Handles TextBox1.Validating
If System.Text.RegularExpressions.Regex.IsMatch(Me.TextBox1.Text, _
"( =^.{8,30}$)( =.*\d)( =.*[a-z])( =.*[A-Z])( =.*[!@#$%^&*()_+}{"":;' />.<,]).*$") = True Then
'strong password Else 'bad password End If End Sub
Edit: Sorry Philipp thats twice I've re-answered your posts, we must be posting at the same time.
Sorry chaps been away for a couple of days
Just wanted to say thankyou , that was exactly what i needed
Gibbo