add password length check to register page

This commit is contained in:
Mystikfluu 2022-07-20 10:58:46 +02:00
parent a706128032
commit 42c5c38249

View File

@ -9,6 +9,15 @@
localStorage.setItem("decryption_key",pw)
//yes I know this is not secure, but at this point I think it'd be better to trust the client for end-to-end encryption
}
const input = document.getElementById('pass');
input.addEventListener('input', () => {
if (input.value.length < 10) {
input.style.borderColor = 'red';
return;
}
input.style.borderColor = 'green';
});
</script>
<script src="/js/addnavbar.js" charset="utf-8"></script>
<link rel="stylesheet" href="/css/global.css">