From 810a65e67cdcf7723d3e3cf747130fbac46b7853 Mon Sep 17 00:00:00 2001 From: Eoghan Conlon Date: Sun, 27 Aug 2023 16:35:52 +0100 Subject: [PATCH] Password confirmation logic completed Signed-off-by: Eoghan Conlon --- src/recovery/reset.html | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/recovery/reset.html b/src/recovery/reset.html index a35d698..0e0336c 100644 --- a/src/recovery/reset.html +++ b/src/recovery/reset.html @@ -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"); + } }