Skip to content

Instantly share code, notes, and snippets.

@sjehutch
Created December 2, 2021 05:50
Show Gist options
  • Save sjehutch/7288835d2e79157285d1b9363541adc6 to your computer and use it in GitHub Desktop.
Save sjehutch/7288835d2e79157285d1b9363541adc6 to your computer and use it in GitHub Desktop.
IsPasswordVlid
private static bool IsPasswordValid(string password)
{
return password.Any(char.IsUpper) && password.Any(char.IsLower) && password.Any(char.IsDigit) && password.Length is >= 8 and <= 16;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment