1

I'm validating passwords. I need to check how many letters and numbers there are in a password. If there were less than 2 numbers or less than 2 letters, the user should be warned about an invalid password.

Carven
  • 14,988
  • 29
  • 118
  • 161
Josh C
  • 57
  • 1
  • 1
  • 6

1 Answers1

0

For each character in the password, check against the ASCII table and count letters and numbers appearances:

enter image description here

Consider adding special characters to the validation.

cahen
  • 15,807
  • 13
  • 47
  • 78