// Global Variables please work //
var firstPasswordInput = document.querySelector('#your-password');
var confirmPasswordInput = document.querySelector('#confirm-password');
var accountCreate = document.querySelector('#account-create');

// Check Requirements //
function checkRequirements() {

  var firstPassword = firstPasswordInput.value;
  var characterMessage = document.querySelector('.js-require-characters');
  var capitalMessage = document.querySelector('.js-require-capital');
  var numberMessage = document.querySelector('.js-require-number');

  // Check Password Length
  if (firstPassword.length < 8) {
    firstPasswordInput.classList.remove('is-valid');
    firstPasswordInput.classList.add('is-invalid');
    characterMessage.classList.remove('is-valid');
    characterMessage.classList.add('is-invalid');
  } else {
    firstPasswordInput.classList.remove('is-invalid');
    firstPasswordInput.classList.add('is-valid');
    characterMessage.classList.remove('is-invalid');
    characterMessage.classList.add('is-valid');
  }

  if (!firstPassword.match(/[A-Z]/g)) {
    firstPasswordInput.classList.remove('is-valid');
    firstPasswordInput.classList.add('is-invalid');
    capitalMessage.classList.remove('is-valid');
    capitalMessage.classList.add('is-invalid');
  } else {
    firstPasswordInput.classList.remove('is-invalid');
    firstPasswordInput.classList.add('is-valid');
    capitalMessage.classList.remove('is-invalid');
    capitalMessage.classList.add('is-valid');
  }

  if (!firstPassword.match(/\d/g)) {
    firstPasswordInput.classList.remove('is-valid');
    firstPasswordInput.classList.add('is-invalid');
    numberMessage.classList.remove('is-valid');
    numberMessage.classList.add('is-invalid');
  } else {
    firstPasswordInput.classList.remove('is-invalid');
    firstPasswordInput.classList.add('is-valid');
    numberMessage.classList.remove('is-invalid');
    numberMessage.classList.add('is-valid');
  }

};

firstPasswordInput.addEventListener('focus', function(event) {
  firstPasswordInput.classList.remove('is-valid');
  firstPasswordInput.classList.remove('is-invalid');
}, true);

firstPasswordInput.addEventListener('blur', function(event) {
  checkRequirements();
}, true);

function comparePasswords() {

  var firstPassword = firstPasswordInput.value;
  var confirmPassword = confirmPasswordInput.value;

  if (firstPassword === confirmPassword) {
    console.log('they match');
  } else {
    console.log("they don't match");
  }

}

confirmPasswordInput.addEventListener('blur', function(event) {
  comparePasswords();
}, true);

// Initialize on Submit

accountCreate.onclick = function () {
  checkRequirements();
};

@@ -615,113 +615,8 @@
 ) %7B%0A
-    firstPasswordInput.classList.remove('is-valid');%0A    firstPasswordInput.classList.add('is-invalid');%0A
     
@@ -727,113 +727,8 @@
 e %7B%0A
-    firstPasswordInput.classList.remove('is-invalid');%0A    firstPasswordInput.classList.add('is-valid');%0A
     
@@ -873,113 +873,8 @@
 ) %7B%0A
-    firstPasswordInput.classList.remove('is-valid');%0A    firstPasswordInput.classList.add('is-invalid');%0A
     
@@ -981,113 +981,8 @@
 e %7B%0A
-    firstPasswordInput.classList.remove('is-invalid');%0A    firstPasswordInput.classList.add('is-valid');%0A
     
@@ -1120,113 +1120,8 @@
 ) %7B%0A
-    firstPasswordInput.classList.remove('is-valid');%0A    firstPasswordInput.classList.add('is-invalid');%0A
     
@@ -1218,24 +1218,232 @@
 %0A  %7D else %7B%0A
+    numberMessage.classList.remove('is-invalid');%0A    numberMessage.classList.add('is-valid');%0A  %7D%0A%0A  if (firstPassword.length %3E= 8) %7B%0A    if (firstPassword.match(/%5BA-Z%5D/g) && firstPassword.match(/%5Cd/g)) %7B%0A  
     firstPas
@@ -1485,24 +1485,26 @@
 alid');%0A    
+  
 firstPasswor
@@ -1545,71 +1545,218 @@
     
-numberMessage.classList.remove('is-invalid');%0A    numberMessage
+%7D else %7B%0A      firstPasswordInput.classList.remove('is-valid');%0A      firstPasswordInput.classList.add('is-invalid');%0A    %7D%0A  %7D else %7B%0A    firstPasswordInput.classList.remove('is-valid');%0A    firstPasswordInput
 .cla
@@ -1762,32 +1762,34 @@
 assList.add('is-
+in
 valid');%0A  %7D%0A%0A%7D;
@@ -1997,36 +1997,37 @@
 dEventListener('
-blur
+keyup
 ', function(even
@@ -2251,77 +2251,227 @@
  con
-sole.log('they match');%0A  %7D else %7B%0A    console.log(%22they don't match%22
+firmPasswordInput.classList.remove('is-invalid');%0A    confirmPasswordInput.classList.add('is-valid');%0A  %7D else %7B%0A    confirmPasswordInput.classList.remove('is-valid');%0A    confirmPasswordInput.classList.add('is-invalid'
 );%0A 
@@ -2520,12 +2520,13 @@
 er('
-blur
+keyup
 ', f

Add 3 conditional validation on passwords