PDA

View Full Version : Password checker that allows the user to enter a possible password in a textbox


heav8nly
Sep 12, 2009, 09:07 PM
I need help creating a password checker, the password must be 8 to 15 chars inlength, and nust contain 1 uppercase, and one lower case and one numeric digit, and a dialog box to display a message box displaying a message wheter or not the password is acceptable.

Perito
Sep 16, 2009, 09:13 AM
This is pretty trivial. Are you a student?

You pop a textbox on a form. I would probably put this in a "validate" event called automatically when the user exits the textbox. One grabs the entered text and put it into a temporary variable. Then, use string functions to determine the length. You'll have to go through the characters one at a time to determine if there is a lower case character, an upper case character, and a numeric digit. I'd set boolean variables to "false" before checking, and if they aren't all true after checking, I'd use that to display the error message (if (not CharPresent) and (not UpperCasePresent) and (not LowerCasePresent) then... )