PassValidator: AtLeastACapitalLetter Requirement
Build a feature that will allow only passwords with at least one capital letter within them.
We'll cover the following...
Before moving on, let’s recap what we’ve done so far in the Validate function:
- It manages the password with less than eight characters and gives back the
ErrToShorterror. - It manages the password with less than two numbers and gives back the
ErrTooFewDigitserror. - It manages these two requirements at the same time.
Let’s explore the next feature we’re going to implement.
At least one capital letter requirement
This requirement forces the password to have at least one capital letter. If the password doesn’t meet it, the Validate function returns the password must contain at least one ...
Ask