function validatePassword() {
  const password = input.password;
  const confirmPassword = input.repassword;
  if (password.value === confirmPassword.value) {
    confirmPassword.setCustomValidity('');
  } else {
    confirmPassword.setCustomValidity('Passwords Don\'t Match');
  }
}
/**
 * Check if password and retype password matches and set setCustomValidity
 * accordingly.
 */
Check if password and retype password matches and set setCustomValidity
accordingly.
Check if password and retype password matches and set setCustomValidity accordingly .
function validatePassword() {
  const password = input.password;
  const confirmPassword = input.repassword;
  if (password.value === confirmPassword.value) {
    confirmPassword.setCustomValidity('');
  } else {
    confirmPassword.setCustomValidity('Passwords Don\'t Match');
  }
}
function validatePassword ( ) { const password = input . password ; const confirmPassword = input . repassword ; if ( password . value === confirmPassword . value ) { confirmPassword . setCustomValidity ( '' ) ; } else { confirmPassword . setCustomValidity ( 'Passwords Don\'t Match' ) ; } }
Check if password and retype password matches and set setCustomValidity
 accordingly.
Check if password and retype password matches and set setCustomValidity accordingly .