Deviopath › React

Password Strength

Medium · Forms

Show how strong the typed password is in <p className="strength">.

Give the password 1 point for each rule it passes:

- at least 8 characters

- contains a digit

- contains an uppercase letter

0 or 1 point is "Weak", 2 points is "Medium", 3 points is "Strong". When the input is empty, show "Enter a password".

Next: Pick Your Toppings