Password confirmation logic completed
Signed-off-by: Eoghan Conlon <eoghanconlon73@skynet.ie>
This commit is contained in:
parent
ff10493be9
commit
810a65e67c
1 changed files with 7 additions and 1 deletions
|
@ -26,7 +26,13 @@
|
|||
|
||||
function formHandler(listener){
|
||||
listener.preventDefault();
|
||||
alert("Default bypassed");
|
||||
const formData = new FormData(formEl);
|
||||
const pass = formData.get("password");
|
||||
if(pass === formData.get("confirm")){
|
||||
alert("Passwords match");
|
||||
} else {
|
||||
alert("Passwords don't match");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
|
Loading…
Reference in a new issue