Skip to content

Commit

Permalink
Refactor password strength indicators update logic
Browse files Browse the repository at this point in the history
  • Loading branch information
deep100x committed Jan 10, 2024
1 parent f7a7467 commit e156c01
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions projects/PassValidation.html
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ <h1 class="text-xl pb-3">Enter Password :</h1>
let hasUpperCase = /[A-Z]/.test(password)
let hasDigit = /\d/.test(password)

document.getElementById("passCheck1").innerHTML = '<i class="fa-solid fa-circle-xmark text-red-600 pe-3"></i>password should be minimum 8 characters (1234Abcd)'
document.getElementById("passCheck2").innerHTML = '<i class="fa-solid fa-circle-xmark text-red-600 pe-3"></i>password must contain minimum 1 Upper case character (ABCD)'
document.getElementById("passCheck3").innerHTML = '<i class="fa-solid fa-circle-xmark text-red-600 pe-3"></i>password must contain numbers (1-9)'

if (isStrongPassword) {
document.getElementById("passCheck1").innerHTML = '<i class="fa-solid fa-circle-check text-green-600 pe-3"></i>password should be minimum 8 characters (1234Abcd)'
}
Expand Down

0 comments on commit e156c01

Please sign in to comment.