public bool IsValidPassword(string password)
{
string MatchNumberPattern = "^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$";
if (!string.IsNullOrEmpty(TextBox2.Text.Trim)) {
if (!Regex.IsMatch(password), MatchNumberPattern)) {
return false;
}
}
}
--------------------
Must be at least 8 characters
-Must contain at least one lower case,oneupper case,
-One digit and one special character
{
string MatchNumberPattern = "^.*(?=.{8,})(?=.*\\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$";
if (!string.IsNullOrEmpty(TextBox2.Text.Trim)) {
if (!Regex.IsMatch(password), MatchNumberPattern)) {
return false;
}
}
}
--------------------
Must be at least 8 characters
-Must contain at least one lower case,oneupper case,
-One digit and one special character
No comments:
Post a Comment